šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

browser-cookies-shim

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-cookies-shim

Shim for the tiny cookies library browser-cookies

0.0.2
latest
Source
npm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
Ā 
Created
Source

browser-cookies-shim

This is a shim for the tiny cookies library browser-cookies

NPM Version Build Status

This shim allows browser-cookies to run on node, though it won't actually set/get/erase any cookies at all. It's mainly useful in case javascipt client code needs to be executed on node without raising any errors (see voltace/browser-cookies#3 for the rationale).

Installation

Using NPM

npm install browser-cookies-shim
npm install browser-cookies

Usage

Require browser-cookies-shim instead of browser-cookies in your application code:

var cookies = require('browser-cookies-shim');

cookies.set('name', 'Lisa'); // May call any of the browser-cookies functions

Now add the following to the package.json in your project:

{
  "browser": {
    "browser-cookies-shim": "browser-cookies"
  }
}

This setup will ensure browsers will load browser-cookies while node will load browser-cookies-shim.

FAQs

Package last updated on 15 Jan 2017

Did you know?

Socket

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.

Install

Related posts