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 🙏

© 2026 – Pkg Stats / Ryan Hefner

chepollo

v1.0.8

Published

A simple es6 class with useful methods for dom manipulation

Readme

Che Pollo!

ChePollo is an ultra-simple framework for common javascript client tasks, such as:

  • Manipulating the DOM
  • Debouncing functions
  • Saving data on localStorage (falling back to cookies)

ChePollo is:

  • super-light (<4kb)
  • written in pure Vanilla javascript using ES6 syntax.
  • transpiled to ES5 using babel and gulp
  • packed in a CommonJS module or available in global scope (window.oo)
  • compatible with IE > 7 (it has polyfill included)

Install

$ npm install chepollo

Usage

oo.ready(function(){
    var foo = oo.getById('foo');
    oo.addClass(foo, 'pollastro');
    oo.addData(foo, 'somekey', 'somedata');
    oo.getData(foo, 'somekey'); // "somedata"
    oo.debounce(function(){
        foo.removeClass(foo, 'pollastro');
    }, 1000)();
});

API reference

chepollo~oo

Class oo.

Kind: inner class of chepollo

oo.ready(_callback)

on DOM ready

Kind: instance method of oo

| Param | Type | | --- | --- | | _callback | function |

oo.getAll(_selector) ⇒ NodeList

return an array of DOM nodes using querySelectorAll()

Kind: instance method of oo

| Param | Type | | --- | --- | | _selector | string |

oo.getOne(_selector) ⇒ Element

return a dom Element using querySelector()

Kind: instance method of oo

| Param | | --- | | _selector |

oo.getById(_id) ⇒ Element

return a DOM node using getElementById

Kind: instance method of oo

| Param | Type | | --- | --- | | _id | string |

oo.fadeIn(_el, _duration)

fadeIn a DOM element

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _duration | int |

oo.fadeOut(_el, _duration)

fadeOut a DOM element

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _duration | int |

oo.addClass(_el, _classes)

add a class to a DOM element

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _classes | string |

oo.removeClass(_el, _classes)

remove a class from a DOM element

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _classes | string |

oo.hasClass(_el, _class) ⇒ boolean

checks if the given DOM element has a class

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _class | string |

oo.toggleClass(_el, _class)

toggle a DOM element class

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _class | string |

oo.addData(_el, _key, _data)

add content to a DOM element dataList

Kind: instance method of oo

| Param | Type | | --- | --- | | _el | Element | | _key | string | | _data | string |

oo.getData(_el, _key) ⇒ string | undefined

return the content of the given dataList key

Kind: instance method of oo

| Param | | --- | | _el | | _key |

oo.storageGet(_key)

get data from localStorage (with cookie fallback)

Kind: instance method of oo

| Param | | --- | | _key |

oo.storageSet(_key, _data)

set data in localStorage (with cookie fallback)

Kind: instance method of oo

| Param | | --- | | _key | | _data |

oo.storageRemove(_key)

removes a key from localStorage (with cookie fallback)

Kind: instance method of oo

| Param | | --- | | _key |

oo.storageClear()

clear localStorage (with cookie fallback)

Kind: instance method of oo

oo.cookieSet(cname, cvalue, exdays)

set a cookie

Kind: instance method of oo

| Param | | --- | | cname | | cvalue | | exdays |

oo.cookieGet(cname) ⇒ *

get a cookie

Kind: instance method of oo

| Param | | --- | | cname |

oo.debounce(func, wait, immediate) ⇒ function

debounce a function

Kind: instance method of oo

| Param | Type | | --- | --- | | func | function | | wait | int | | immediate | boolean |