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

advanced-cookie-manager

v0.1.4

Published

Small client-side javascript library that makes managing cookies easy.

Downloads

21

Readme

Advanced Cookie Manager

v 1.1.4 (02192017)

Small client-side javascript library that makes managing cookies easy.

Features
Browser Compatibility
Getting the Library
API Reference

Features

  • RFC6265 compliant
  • Cross browser
  • Lightweight
  • No dependencies

Browser Compatibility

The following browsers have passed all of the automated Cookies.js tests:

  • Chrome
  • Firefox 3+
  • Safari 4+
  • Opera 10+
  • Internet Explorer 6+

Getting the Library

Direct downloads

v1.1.4 (~ 13.94 KB) v1.1.4 Minified (~ 2.52 KB)

API Reference

Methods
acm.initialize(options)
acm.set(key, value, options = {})
acm.get(key)
acm.unset(key)

Properties

Expires

A number (of seconds), a number parsable string, or a Date object of when the cookie will expire. By default is 0 (session cookie).

Example Usage

acm.expires = 3600; // Expires number format 1 hour
acm.expires = '3600'; // Expires string format 1 hour
acm.expires = new Date(2020, 0, 1); // Expires at Wed Jan 01 2020 00:00:00 GMT+0200

Path

A string value of the path of the cookie. By default is '/'.

Example Usage

acm.path = '/'; // Path for all pages
acm.path = '/cart'; // Path only for /cart page
acm.path = '/success'; // Path only for /success page

Domain

A string value of the domain of the cookie. By default is equal to current domain.

Example Usage

acm.domain = 'www.example.com'; // Set www.example.com as default domain

Secure

A boolean value of whether or not the cookie should only be available over SSL. By default is false.

Just now it deprecated and dosen't use.

Additional properties

Debug

Enable debug option set show in console information about create/delee cookie.

Example Usage

acm.debug = false; // disable
acm.debug = true; // enable

Encode

Set encode cookie encodeUri() value (encode by default), you can disable/enable this option.

Example Usage

acm.encode = false; // disable
acm.encode = true; // enable

Methods

acm.initialize(options)

Set default options for all new cookies

Example Usage


// Initialize all options
acm.initialize({
    expires : 3600,
    path : '/',
    domain : 'www.example.com',
});

// Initialize expires
acm.initialize({
    expires : 3600,
});

And now all new cookies without options has this options as default.

acm.set(key, value [, options])

Sets a cookie in the document. If the cookie already exist, it will be rewrite it.

| Option | Description | Default | | --------: | -------------------------------------------------------------------------------------------------- | ----------- | | expires | A number (of seconds), a number parsable string, or a Date object of when the cookie will expire | 0 | | path | A string value of the path of the cookie | / | | domain | A string value of the domain of the cookie | empty | | secure | A boolean value of whether or not the cookie should only be available over SSL (deprecated) | false |

Example Usage


// Setting a cookie value
acm.set('key', 'value');

// Setting cookies with additional options
acm.set('key', 'value', { domain: 'www.example.com'});

// Setting cookies with expiration values
acm.set('key', 'value', { expires: 3600 }); // Expires in 1 hour
acm.set('key', 'value', { expires: '3600' }); // Expires in 1 hour
acm.set('key', 'value', { expires: new Date(2020, 0, 1) }); // Expires at Wed Jan 01 2020 00:00:00 GMT+0200

acm.get(key)

Returns the value of the most locally scoped cookie with the specified key.

Example Usage


// Get the cookie value
acm.get('key'); // "value"

If key is empty acm() method return all locally scoped cookies as array of items (cookies).

Example Usage


// Get all cookies
acm.get(); // [[name  : name, value : value], [...], ...}]

acm.unset(key)

Unse the most locally scoped cookie with the specified key.

Example Usage


// Unset the cookie
acm.unset('key');