1.0.0 • Published 9 years ago

township-cookie v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

township-cookie

helpers for using cookies with township

npm travis standard conduct

About

If your use case requires you to store the JWTs that township creates in cookies rather than localstorage or similar, this module can help.

Install

npm install --save township-cookie

Usage

var townshipCookie = require('township-cookie')

var cookies = townshipCookie({
  name: 'example',
  hostname: 'example.com'
})

// set a cookie with a JWT token on a response object
cookies.set(res, token)

// get a token from a cookie on a request object
var token = cookies.get(req)

// remove a cookie from a response object
cookies.remove(req)

Contributing

Contributions are welcome! Please read the contributing guidelines first.

Conduct

It's important that this project contributes to a friendly, safe, and welcoming environment for all, particularly for folks that are historically underrepresented in technology. Read this project's code of conduct

License

ISC