Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
cookie-micro
Advanced tools
CookieJS - Just another small JavaScript library. Use this if you need to set/get/delete cookies.
This library is now pushed to NPM, and is available as an UMD build.
$ npm i --save cookie-micro
<script src="//unpkg.com/cookie-micro/cookie.min.js"></script>
No jQuery needed.
How to use:
CookieJS.set({
name: 'mycookie',
value:'myvalue',
expires: 30, // x Days
path: '/', // Website path
domain: 'domain.com', // Optional
secure: true, // Optional
httpOnly: false // Optional
});
No return value.
CookieJS.get('mycookie');
Returns the value of the stored cookie, or undefined if the cookies key does not exist.
//Example:
var cookies = CookieJS.getAll();
console.log(cookies.mycookie);
// Output: myvalue
Returns a key-value hash of available cookies on the document. If there are no available cookies, an empty hash is returned.
//Example:
var cookies = CookieJS.keys();
console.log(cookies[0]);
// Output: mycookie
Returns an array of keys of set cookies. If no cookies have been set, CookieJS.keys()
returns an empty array.
CookieJS.has('mycookie');
//Output: returns true or false
Returns true if name
is the key of a cookie, otherwise returns false.
CookieJS.delete({
name: 'mycookie',
path: '/'
});
No return value.
FAQs
JavaScript Cookie micro library
The npm package cookie-micro receives a total of 1 weekly downloads. As such, cookie-micro popularity was classified as not popular.
We found that cookie-micro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.