National Park of Minnesota
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    component-cookiepublic

    cookie

    Cookie component.

    Installation

    $ component install component/cookie
    

    Example

    // set 
    cookie('name', 'tobi')
    cookie('name', 'tobi', { path: '/' })
    cookie('name', 'tobi', { maxage: 60000 }) // in milliseconds 
    cookie('species', 'ferret')
     
    // get 
    var name = cookie('name')
    // => "tobi" 
     
    var cookies = cookie()
    // => { name: "tobi", species: "ferret" } 
     
    // clear 
    cookie('name', null)

    License

    MIT

    Keywords

    none

    install

    npm i component-cookie

    Downloadslast 7 days

    14,437

    version

    1.1.3

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar