UNPKG

set-cookie

Version:

Set a cookie using the same API on both the client and the server.

8 lines (6 loc) 222 B
var cookie = require('cookie'); var setter = require('./lib/setter'); module.exports = function setCookie(name, value, options) { var cookieStr = cookie.serialize(name, value, options); setter(cookieStr, options); };