Socket
Socket
Sign inDemoInstall

@haikel/min-cookie

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @haikel/min-cookie

A simple, lightweight JavaScript package for handling cookies


Version published
Weekly downloads
14
increased by1300%
Maintainers
1
Install size
3.58 kB
Created
Weekly downloads
 

Readme

Source

MinCookie.js

bundlephobia badge

bundlephobia badge

A simple, lightweight JavaScript package for handling cookies

$ npm install @haikel/min-cookie --save

Usage

import mcookie from '@haikel/min-cookie';
or
let mcookie = require('@haikel/min-cookie');  

Or include it via jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/@haikel/min-cookie@1.1.2/index.min.js"></script>

Methods

mcookie.set(cookieName, exdays, path, cookieData) : boolean

mcookie.get(cookieName) : array

mcookie.check(cookieName) : boolean

mcookie.remove(cookieName) : boolean

Examples

import mcookie from '@haikel/min-cookie';

const myData = [
    "https://my test.com", "helloworld.com/", "?name=ståle", "&car=saa"
];

mcookie.set("mycookie" , 1, "/", myData); // true

mcookie.check("mycookie"); // true

mcookie.get("mycookie");
// ["https://my test.com", "helloworld.com/", "?name=ståle", "&car=saa"]

mcookie.remove("mycookie"); // true

License

MIT

Keywords

FAQs

Last updated on 16 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc