npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

parrotjs

v1.2.0

Published

Browser features today. High-level wrapper for browser features.

Downloads

56

Readme

Parrot

![Gitter](https://badges.gitter.im/Join Chat.svg) Dependency status Dev Dependencies Status Gittip

Browsers are more modern than ever. You can know the battery of your laptop, vibrate your mobile or know your position. JavaScript (and browsers) are in everything and can do more things than you think.

On the other hand, the API of this news features are too primitive: the browsers just provide the minimal interface, and is necessary write a little code around it. Also, each browser have specific vendor and exist minimal changes in the way to access a this methods.

Parrot is a high-level wrapper for browser features: It's provide you concise methods for use this features today.

Install

For install the library use bower:

$ bower install parrotjs
$ bower install parrot-module-device

You need always install parrotjs core and later the modules that you want to use.

Modules

One of the most important thing in parrot is that the design of code is modular, and you can only use the wrappers that you need. This is very nice for use the minimum code in different projects. All code is minifier and prepare for production.

When you are programming for the frontend side, each line of code is importat. The core of parrot provide you a facade for the DOM handler (jQuery, QuoJS or Zepto) and useful helpers methods to use across the module, but nothing more.

| Name | Description | |--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| | parrot | This repository and have the basic code provide DOM Handler and other minimal things. | | parrot-boilerplate | If you want to create a parrot-module, clone this repository and you have the standard scaffold and pre-configuration for do it. | | parrot-module-ajax | Make easy do AJAX petitions with different backend. Using with URL module for better experience. | | parrot-module-url | URL Management with support for different environments (testing, production, development,...). Use with AJAX for better experience. | | parrot-module-storage | Provides a uniformly API for management localStorage and SessionStorage. | | parrot-module-notification | Interact with HTML5 Notifications. It makes easy to reuse notifications. | | parrot-module-device | Automatically detect your device and provide some useful information: vendor, screen properties, browser vendor and version,... | | parrot-module-geolocation | Using geolocation with guarantees to obtain a good approximation |

Builds

We offers different builds depending on what you need

Standalone (without DOM Handler)

Just parrot code. You need to provide an DOM handler:

<script src="bower_components/parrotjs/dist/parrot.standalone.js"></script>

Standard (with QuoJS, jQuery or ZeptoJS as DOM Handler)

Parrot code + DOM Handler. We have 3 different builds:

<script src="bower_components/parrotjs/dist/parrot.quo.js"></script>
<script src="bower_components/parrotjs/dist/parrot.jquery.js"></script>
<script src="bower_components/parrotjs/dist/parrot.zepto.js"></script>

For use different modules, just chain the modules in your html:

<script src="bower_components/parrotjs/dist/parrot.quo.js"></script>
<script src="bower_components/parrot-module-device/dist/parrot.device.js"></script>

Remember that for production you can concatenate all files that you need in one creating a simple Gulp/Grunt task.

Documentation

This module provides the parrot namespace and the global methods that other modules need, which are not interesting for you.

parrot

.version

Returns the version of the library.

parrot.version
# => '0.11.27'

.$

Returns the instance of the DOM handlers (QuoJS, jQuery or ZeptoJS)

parrot.$

.language

Returns the language detected in the browser.

parrot.language
# => 'en'

License

MIT © parrotjs