JSPM

cookie-lite

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11310
  • Score
    100M100P100Q135559F
  • License SEE LICENSE IN LICENSE.md

Super lightweight cookie parser and serializer

Package Exports

  • cookie-lite
  • cookie-lite/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cookie-lite) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cookie-lite logo

Super lightweight cookie parser and serializer

Friendly fork of ethan7g/cookieLite post it's deprecation https://github.com/ethan7g/cookieLite/issues/3

Super lightweight cookie parser and serializer

Full documentation | GitHub | NPM

Installation

npm i --save cookie-lite
const cookieLite = require('cookie-lite')

cookieLite.parse('foo=bar; copyright=%C2%A9;another=test') // {foo: 'bar', copyright: '©', another: 'test'}
cookieLite.serialize({
    name: 'Choco',
    'HttpOnly': null
}) // 'name=Choco;HttpOnly'

cookie-lite is super lightweight. It's over much more lightweight than cookie, another popular cookie package. cookie-lite is the way to go for efficiency as it parses using JS regular expressions!