JSPM

set-cookie-parser-es

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 615
  • Score
    100M100P100Q102669F
  • License MIT

ESM port of set-cookie-parser with bundled types.

Package Exports

  • set-cookie-parser-es

Readme

set-cookie-parser-es

npm version Codecov bundle

ESM build of set-cookie-parser with bundled types. Accepts a single set-cookie header value or an array of set-cookie header.

☝🏻 Unlike the original "set-cookie-parser":

  • this library doesn't accept Node.js response object, in order to be framework/runtime agnostic.
  • splitCookiesString accepts set-cookie string only.

Usage

Install:

# npm
npm i set-cookie-parser-es

# yarn
yarn add set-cookie-parser-es

Import:

// ESM
import { parse, parseString, splitCookiesString } from 'set-cookie-parser-es'

// CommonJS
const { parse, parseString, splitCookiesString } = require('set-cookie-parser-es')

License

MIT