![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
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-dough
Advanced tools
An isomorphic JavaScript cookie library.
Wraps https://www.npmjs.com/package/cookie to work on the client and server. Also, required is having parsed cookies in express (for now).
// client-side
// automatically parses the cookies for the page
var cookie = require('cookie-dough')();
cookie.get('name');
// server-side
var express = require('express'),
CookieDough = require('cookie-dough'),
cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/', function(req, res){
var cookie = new CookieDough(req); // req is required when creating an instance
cookie.get('name');
});
// client-side
// automatically parses the cookies for the page
var cookie = require('cookie-dough')();
// returns an object with all of the cookies
// format: { cookieName: "cookie value" }
cookie.all();
// server-side
var express = require('express'),
CookieDough = require('cookie-dough'),
cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/', function(req, res){
var cookie = new CookieDough(req);
cookie.all();
});
// client-side
var cookie = require('cookie-dough')();
cookie.set('name', 'value', { /* options */ });
// server-side
var express = require('express'),
CookieDough = require('cookie-dough'),
cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/', function(req, res){
var cookie = new CookieDough(req);
cookie.set('name', 'value', { /* options */ });
});
The options that you can set on a cookie:
path - cookie path
expires - absolute expiration date for the cookie (Date object)
maxAge - relative max age of the cookie from when the client receives it (seconds)
domain - domain for the cookie
secure - true or false
httpOnly - true or false
// client-side
var cookie = require('cookie-dough')();
cookie.remove('name', { /* options */ });
// server-side
var express = require('express'),
CookieDough = require('cookie-dough'),
cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/', function(req, res){
var cookie = new CookieDough(req);
cookie.remove('name');
});
The options that can be set to remove a cookie are:
path - cookie path
domain - domain for the cookie
FAQs
An isomorphic JavaScript cookie library
The npm package cookie-dough receives a total of 665 weekly downloads. As such, cookie-dough popularity was classified as not popular.
We found that cookie-dough 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.