Socket
Socket
Sign inDemoInstall

browser-cookies-shim

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browser-cookies-shim

Shim for the tiny cookies library browser-cookies


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
3.59 kB
Created
Weekly downloads
 

Readme

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

Last updated on 15 Jan 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc