cookie-url
v0.0.3
Published
Generate URL from cookie object
Downloads
10
Readme
cookie-url
Generate browser cookie url from cookie object. Supports Chrome Cookie & Firefox
Install
npm i cookie-url
Usage
const CookieURL = require('cookie-url');
const cookie = {
secure: false,
domain: '.github.com',
path: '/arshadkazmi42'
};
console.log(CookieURL(cookie));
// OUTPUT
// http://github.com/arshadkazmi42
const cookie = {
secure: true,
domain: '.github.com',
path: '/arshadkazmi42'
};
console.log(CookieURL(cookie));
// OUTPUT
// https://github.com/arshadkazmi42
const cookie = {
secure: true,
domain: '.github.com',
path: '/arshadkazmi42'
};
console.log(CookieURL(cookie, true /* withWWWPrefix */));
// OUTPUT
// https://www.github.com/arshadkazmi42
const cookie = {
secure: true,
domain: '.www.github.com',
path: '/arshadkazmi42'
};
console.log(CookieURL(cookie, true /* withWWWPrefix */));
// OUTPUT
// https://www.github.com/arshadkazmi42
Contributing
Interested in contributing to this project? You can log any issues or suggestion related to this library here
Read our contributing guide on getting started with contributing to the codebase
Contributors
Thank you to all the contributors who have helped us in making this project better :raised_hands: