@haikel/min-cookie
Advanced tools
Comparing version 1.0.10 to 1.1.0
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
50
1
0
3269
3
48