JSPM

  • Created
  • Published
  • Downloads 234238
  • Score
    100M100P100Q165664F
  • License MIT

A set of cookie helpers for Next.js

Package Exports

  • nookies

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 (nookies) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

XO code style

nookies 🍪 🍪 🍪

A collection of cookie helpers for Next.js

  • SSR support, for setter, parser and destory
  • super light
  • perfect for authentication

Setting and destorying cookies also works on server-side.

Usage

// Parse
parseCookies(ctx)

// Set
setCookie(ctx, 'token', token, {
   maxAge: 30 * 24 * 60 * 60,
   path: '/'
})

// Destory
destroyCookie(ctx, 'token')

License

MIT