![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@wetransfer/concorde-cookie
Advanced tools
A set of tools to deal with cookies on the browser.
Cookie module. Handy functions to deal with cookies on the browser.
npm install @wetransfer/concorde-cookie --save
Import the package if your are using a package bundler like Webpack or Parcel:
import Cookie from '@wetransfer/concorde-cookie';
if (Cookie.get('SSID')) {
// Do some magic!
}
Or load directly the final bundle on your browser, using a script tag. All concorde.js modules will be available in a global variable called WT
:
<!-- This will load the latest version of @wetransfer/concorde-cookie module -->
<script src="https://unpkg.com/@wetransfer/concorde-cookie/dist/concorde-cookie.min.js"></script>
<script>
WT.cookie.set('SSID', 'BBlPjuhTimjov9RCB', { secure: true });
</script>
const Cookie = require('@wetransfer/concorde-cookie');
Cookie.set('SSID', 'BBlPjuhTimjov9RCB', { secure: true });
Cookie.configure
Configure default options used when settings values for cookies. If all your cookies must present the same property, like secure, use this method before setting the cookie values.
Cookie.configure({ secure: true });
Cookie.set('foo', 'bar');
// => foo=bar; secure'
The following options can be configured:
Cookie.configure({
// Cookie expiration date
expires: new Date('Fri, 01 Jan 2016 09:05:12 GMT'),
// Sets the URI to which the Cookie applies. Must be an absolute path.
path: '/path',
// Sets the domain to which the Cookie applies. If a domain is specified, subdomains are always included.
domain: 'wetransfer.com',
// Cookie to only be transmitted over secure protocol as https.
secure:true,
});
Cookie.get
Get the value from a cookie, given a cookie name.
Cookie.get('foo');
// => 'bar'
// Default value in case cookies are not available or the value has not been set previously.
Cookie.get('nonexistant', { defaultValue: 1 });
// => 1
// If raw property is true, the value of the cookie is not decoded.
Cookie.get('bar', { raw: true });
// => 'bar%20value'
Cookie.set
Set the value for a cookie. If extra options are specified, they will override default options defined with configure method
.
Cookie.set('foo', 'bar');
// => 'foo=bar'
// Set extra options for the current cookie
Cookie.set('foo', 'bar', { secure: true});
// => 'foo=bar; secure'
Cookie.unset
Unsets the value of a cookie, with null
, and expires it.
Cookie.unset('foo');
// => 'foo=null; expires=Thu, 21 Dec 2017 10:57:39 GMT'
In case you want to develop/debug this module while integrating with other project, please follow these steps:
npm link
to create a global symlink to that modulenpm run build:watch
to listen to changes and rebuild the modulenpm link @wetransfer/concorde-cookie
FAQs
A set of tools to deal with cookies on the browser.
The npm package @wetransfer/concorde-cookie receives a total of 0 weekly downloads. As such, @wetransfer/concorde-cookie popularity was classified as not popular.
We found that @wetransfer/concorde-cookie demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
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.