New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yurkimus/cookies

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yurkimus/cookies

JavaScript-utilities to handle cookies everywhere.

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-90.48%
Maintainers
0
Weekly downloads
 
Created
Source

Cookies

JavaScript-utilities to handle cookies everywhere.

Table of Contents

  • Installation
  • Exports
  • License

Installation

npm

npm install @yurkimus/cookies

urls

"@yurkimus/cookies": "npm:@yurkimus/cookies"
"@yurkimus/cookies": "github:yurkimus/cookies"
"@yurkimus/cookies": "https://raw.githubusercontent.com/yurkimus/cookies/main/source/index.js"

Exports

read

Definition
read :: string -> string -> string
Example
let cookie = 'name=John; age=30; role=admin'

let age = read('age', cookie) // => '30'

let [age, name] = ['age', 'name']
  .map(key => read(key))
  .map(reader => reader(cookie)) // => ['30', 'John']

parse

Definition
parse :: string -> object
Example
parse('name=John; age=30; role=admin') // => { name: 'John', age: '30', role: 'admin' }

serialize

Definition
serialize :: string -> * -> [(string, string)] -> string
Example
let attributes = [
  ['path', '/'],
  ['expires', 'Wed, 21 Oct 2026 07:28:00 GMT'],
]

serialize('name', 'John', attributes) // => 'name=John; path=/; expires=Wed, 21 Oct 2026 07:28:00 GMT'

License

MIT

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc