🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

localcookies

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localcookies

A tiny localStorage shim with fallback to Cookies. Will allow apps to use localStorage but fallsback to cookies when that is not available in the browser.

2.0.0
latest
npm
Version published
Weekly downloads
2.3K
-23.64%
Maintainers
1
Weekly downloads
 
Created
Source

localCookies

A tiny localStorage shim with fallback to Cookies. Will allow apps to use localStorage but fallsback to cookies when that is not available in the browser.

About localCookies

The localCookies library has the exact same API as localStorage, for more information see here.

localCookies comes in two flavors a iife function that can be directly used in the and a ES6 module under ./module

Getting started

localCookies can be directly imported from the dist or module folder. For development:

npm install github:WebPlatformForEmbedded/localCookie
// or
yarn add github:WebPlatformForEmbedded/localCookie

Next you can import the localCookies dependency into your own script and start implementing it from there.

import Storage from './module/localCookie.js',
// or
const Storage = require('./module/localCookie.js')

Build

To build a new dist or module from source execute: npm run build

Running tests

This library has unit / integration tests, located in the tests folder.

To run all the tests execute: npm test

This will run rollup, start a http-server with mocha/chai and run the tests in a browser.

FAQs

Package last updated on 13 Oct 2022

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