Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@haikel/min-cookie

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haikel/min-cookie - npm Package Compare versions

Comparing version 1.0.10 to 1.1.0

index.js

15

package.json
{
"name": "@haikel/min-cookie",
"version": "1.0.10",
"version": "1.1.0",
"description": "A simple, lightweight JavaScript package for handling cookies",
"main": "app.js",
"main": "index.js",
"scripts": {
"test": "test app.js"
"test": "test app.js",
"dev": "parcel examples/index.html"
},
"keywords": [
"Javascript",
"js",
"cookie",
"cookies",
"client side"
"client side",
"javascript",
"js"
],

@@ -26,2 +27,2 @@ "author": "Haikel Fazzani",

"homepage": "https://github.com/haikelfazzani/min-cookie.git#readme"
}
}

@@ -1,53 +0,48 @@

<p>MinCookie.js</p>
<p>A simple, lightweight JavaScript package for handling cookies</p>
## MinCookie.js
A simple, lightweight JavaScript package for handling cookies
<h2>Usage</h2>
```js
$ npm install min-cookie --save
```
<pre><code>
import MinCookie from '@haikel/min-cookie';
### Usage
```js
import mcookie from '@haikel/min-cookie';
or
let MinCookie = require('@haikel/min-cookie');
</code></pre>
let mcookie = require('@haikel/min-cookie');
```
### Methods
<h4>Mehods</h4>
<pre><code>
<ul>
<li>// cookieName : string, exdays : number, path : string, cookieData : []
<strong>MinCookie.set(cookieName, exdays, path, cookieData) : return boolean</strong></li>
```js
mcookie.set(cookieName: String, exdays: Number, path: String, cookieData : []) : boolean
<li>// cookieName : string
<strong>MinCookie.get(cookieName) : return array</strong></li>
mcookie.get(cookieName: String) : array
<li>// cookieName : string
<strong>MinCookie.check(cookieName) : return boolean</strong></li>
mcookie.check(cookieName: String) : boolean
<li>// cookieName : string
<strong>MinCookie.remove(cookieName) : return boolean</strong></li>
</ul>
</code></pre>
mcookie.remove(cookieName: String) : boolean
```
<h4>Examples</h4>
### Examples
<pre><code>
import MinCookie from '@haikel/min-cookie';
```js
import mcookie from '@haikel/min-cookie';
const myData = [
"https://my test.com",
"helloworld.com/",
"?name=ståle",
"&car=saa"
"https://my test.com", "helloworld.com/", "?name=ståle", "&car=saa"
];
MinCookie.set("mycookie" , 1, "/", myData);
-> true
mcookie.set("mycookie" , 1, "/", myData); // true
MinCookie.get("mycookie");
-> ["https://my test.com", "helloworld.com/", "?name=ståle", "&car=saa"]
mcookie.check("mycookie"); // true
MinCookie.remove("mycookie")
-> true
</code></pre>
mcookie.get("mycookie");
// ["https://my test.com", "helloworld.com/", "?name=ståle", "&car=saa"]
mcookie.remove("mycookie"); // true
```
### License
MIT
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