cookie-signature
npmv1.2.2Sign and unsign cookies
Adopt with care
cookie-signature is usable, with caveats. Last published 680 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 680 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 4.9 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding cookie-signature to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=6.6.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the cookie-signature README.
var cookie = require('cookie-signature');
var val = cookie.sign('hello', 'tobiiscool');
val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
var val = cookie.sign('hello', 'tobiiscool');
cookie.unsign(val, 'tobiiscool').should.equal('hello');
cookie.unsign(val, 'luna').should.be.false;cookie-signature vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| cookie-signaturethis page | 0 | 1 | MIT | 1 year ago |
| set-cookie-parser | 50.2M | 2 | MIT | 1 day ago |
| cookie | 0 | 5 | MIT | 1 day ago |
| jose | 0 | 2 | MIT | 1 day ago |
Dependencies
Declared by cookie-signature v1.2.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on cookie-signature.
Relationship graph
Dependencies (left) and dependents (right) of cookie-signature.
Frequently installed together
Create and parse HTTP Content-Type header
The ultimate javascript content-type utility.
Create HTTP error objects
An AST-based pattern checker for JavaScript.
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Node.js final http responder
Infer the content-type of a request.
Better streaming static file server with Range and conditional-GET support
Merge objects using their property descriptors
Run a function exactly one time
Deprecate all the things
Manipulate the HTTP Vary header
Release history
No releases in the last two years, typically about 179 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.2latest | 1 year ago | 4.9 KB | MIT |
| 1.0.7 | 3 years ago | 4.0 KB | MIT |
| 1.2.1 | 3 years ago | 4.6 KB | MIT |
| 1.2.0 | 4 years ago | 4.2 KB | MIT |
| 1.1.0 | 8 years ago | — | MIT |
| 1.0.6 | 11 years ago | — | MIT |
| 1.0.5 | 12 years ago | — | MIT |
| 1.0.4 | 12 years ago | — | MIT |
| 1.0.3 | 12 years ago | — | MIT |
| 1.0.2 | 12 years ago | — | MIT |
| 1.0.1 | 13 years ago | — | MIT |
| 1.0.0 | 13 years ago | — | MIT |
| 0.0.1 | 14 years ago | — | MIT |
Overview
cookie-signature is an npm package that sign and unsign cookies. It has 1 known dependents in the graph. The latest version is 1.2.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need sign and unsign cookies and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use cookie-signature?
cookie-signature is usable, with caveats. Last published 680 days ago.
How do I install cookie-signature?
Run `npm install cookie-signature` to add cookie-signature to your npm project.
What license is cookie-signature released under?
cookie-signature is distributed under the MIT license.
How popular is cookie-signature?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on cookie-signature.
Is cookie-signature still maintained?
The most recent release of cookie-signature (v1.2.2) was published 1 year ago.
Does cookie-signature run install scripts?
No. cookie-signature does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.