Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-cookies

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-cookies

[![NPM Version][npm-image]][npm-url]

  • 1.0.4
  • latest
  • beta-1.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cookies

[![NPM Version][npm-image]][npm-url]

how

npm install js-cookies

如果需要编译之后的版本

npm run build

封装document.cookie的一些简单操作,提供类似localstorage的API供调用。

import cookies from 'cookies';

cookies.setItem('foo', 'bar');
cookies.getItem('foo');
// bar
cookies.hasItem('foo');
// true
cookies.keys()
// ['foo']
cookie.removeItem('foo');
// ''

##test npm run devtest 在浏览器地址栏输入: http://localhost:8088/webpack-dev-server/test/index.html

License

MIT [npm-image]: https://img.shields.io/npm/v/cookie.svg [npm-url]: https://npmjs.org/package/cookie

Keywords

FAQs

Package last updated on 06 Apr 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc