Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arshadkazmi42/cookie-url
Generate cookie url using cookie object
https://github.com/arshadkazmi42/cookie-url
browser-extension chrome cookie domain firefox url
Last synced: 24 days ago
JSON representation
Generate cookie url using cookie object
- Host: GitHub
- URL: https://github.com/arshadkazmi42/cookie-url
- Owner: arshadkazmi42
- License: mit
- Created: 2019-12-02T17:36:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T12:26:25.000Z (over 2 years ago)
- Last Synced: 2024-12-12T00:12:05.346Z (27 days ago)
- Topics: browser-extension, chrome, cookie, domain, firefox, url
- Language: JavaScript
- Homepage:
- Size: 167 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# cookie-url
[![Build](https://github.com/arshadkazmi42/cookie-url/actions/workflows/nodejs.yml/badge.svg)](https://github.com/arshadkazmi42/cookie-url/actions/workflows/nodejs.yml)
[![NPM Version](https://img.shields.io/npm/v/cookie-url.svg)](https://www.npmjs.com/package/cookie-url)
[![NPM Downloads](https://img.shields.io/npm/dt/cookie-url.svg)](https://www.npmjs.com/package/cookie-url)
[![Github Repo Size](https://img.shields.io/github/repo-size/arshadkazmi42/cookie-url.svg)](https://github.com/arshadkazmi42/cookie-url)
[![LICENSE](https://img.shields.io/npm/l/cookie-url.svg)](https://github.com/arshadkazmi42/cookie-url/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/arshadkazmi42/cookie-url.svg)](https://github.com/arshadkazmi42/cookie-url/graphs/contributors)
[![Commit](https://img.shields.io/github/last-commit/arshadkazmi42/cookie-url.svg)](https://github.com/arshadkazmi42/cookie-url/commits/master)Generate browser cookie url from cookie object. Supports [Chrome Cookie](https://developer.chrome.com/extensions/cookies#type-Cookie) & [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/Cookie#Type)
## Install
```
npm i cookie-url
```## Usage
```javascript
const CookieURL = require('cookie-url');
const cookie = {
secure: false,
domain: '.github.com',
path: '/arshadkazmi42'
};console.log(CookieURL(cookie));
// OUTPUT
// http://github.com/arshadkazmi42const cookie = {
secure: true,
domain: '.github.com',
path: '/arshadkazmi42'
};console.log(CookieURL(cookie));
// OUTPUT
// https://github.com/arshadkazmi42const cookie = {
secure: true,
domain: '.github.com',
path: '/arshadkazmi42'
};console.log(CookieURL(cookie, true /* withWWWPrefix */));
// OUTPUT
// https://www.github.com/arshadkazmi42const 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](https://github.com/arshadkazmi42/cookie-url/issues/new)Read our contributing [guide](CONTRIBUTING.md) on getting started with contributing to the codebase