JSPM

  • Created
  • Published
  • Downloads 234221
  • Score
    100M100P100Q175283F
  • License MIT

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 0x1F36A 0x1F36A 0x1F36A 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