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

crumble

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crumble - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

crumble.cjs

11

CHANGELOG.md

@@ -5,2 +5,13 @@ # Changelog

## [2.3.0] (2021-05-14)
### Added
- Introduced an ESM version of this module that will be used when being imported using `import`.
### Changed
- This module is now transpiled using Babel.
- The UMD version of this module now exposes itself using the name `crumble` instead of `Crumble`.
## [2.2.0] (2019-04-28)

@@ -7,0 +18,0 @@

2

LICENSE.txt
MIT License
Copyright (c) 2015 - 2019 Luke Phillips
Copyright (c) 2015 - 2021 Luke Phillips

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name" : "crumble",
"version" : "2.2.0",
"version" : "2.3.0",
"type" : "module",
"description" : "A RFC-6265 compliant library that makes reading and writing cookies easy.",

@@ -28,19 +30,25 @@

{
"rollup" : "1.10.1",
"rollup-plugin-commonjs" : "9.3.4",
"rollup-plugin-buble" : "0.19.6",
"rollup-plugin-uglify" : "6.0.2",
"mocha" : "6.1.4",
"chai" : "4.2.0",
"rollup" : "2.47.0",
"rollup-plugin-terser" : "7.0.2",
"@rollup/plugin-babel" : "5.3.0",
"mocha" : "8.4.0",
"chai" : "4.3.4",
"chai-string" : "1.5.0",
"sinon" : "7.3.2",
"eslint" : "5.16.0",
"eslint-plugin-import" : "2.17.2",
"eslint-plugin-promise" : "4.1.1",
"eslint-config-protect-me-from-my-stupidity" : "~3.2.0"
"sinon" : "10.0.0",
"eslint" : "7.26.0",
"eslint-plugin-import" : "2.22.1",
"eslint-plugin-promise" : "5.1.0",
"eslint-config-protect-me-from-my-stupidity" : "7.1.2",
"@babel/core" : "7.14.2",
"@babel/preset-env" : "7.14.2"
},
"main" : "src/Crumble.js",
"main" : "crumble.cjs",
"browser" : "Crumble.js",
"exports" :
{
"import" : "./crumble.js",
"require" : "./crumble.cjs",
"default" : "./crumble.cjs"
},

@@ -57,5 +65,5 @@ "repository" :

{
"lint" : "eslint \"src/**/*.js\" \"tests/**/*.js\"",
"unit" : "mocha \"tests/**/*.test.js\"",
"test" : "npm run lint && npm run unit",
"test:lint" : "eslint \"**/*.js\"",
"test:unit" : "mocha \"tests/**/*.test.js\"",
"test" : "npm run test:lint && npm run test:unit",
"build" : "rollup --config",

@@ -65,8 +73,3 @@ "prepack" : "npm run test && npm run build"

"engines" :
{
"node" : ">=6.0.0"
},
"types" : "Crumble.d.ts"
"types" : "crumble.d.ts"
}
# Crumble
[![Available from NPM](https://img.shields.io/npm/v/crumble.svg?maxAge=900)](https://www.npmjs.com/package/crumble)
[![Built using Travis](https://img.shields.io/travis/lsphillips/Crumble/master.svg?maxAge=900)](https://travis-ci.org/lsphillips/Crumble)
[![Built using Travis](https://img.shields.io/travis/com/lsphillips/Crumble/master.svg?maxAge=900)](https://travis-ci.com/lsphillips/Crumble)
A RFC-6265 compliant library that makes reading and writing cookies easy.
## Interface
## Usage
### `string Crumble#getCookie(string plate, string name)`
This module can be treated as an ES module:
``` js
import * as crumble from 'crumble';
// or
import { getCookie, hasCookie, setCookie, removeCookie } from 'crumble';
```
This module can also be treated as a CommonJS module:
``` js
const crumble = require('crumble');
// or
const { getCookie, hasCookie, setCookie, removeCookie } = require('crumble');
```
### `string getCookie(string plate, string name)`
Reads the value of a cookie from a plate of cookies like `document.cookie`.

@@ -17,3 +33,3 @@

``` js
let cookie = Crumble.getCookie(document.cookie, 'cookie');
let cookie = getCookie(document.cookie, 'cookie');
```

@@ -23,3 +39,3 @@

### `bool Crumble#hasCookie(string plate, string name)`
### `bool hasCookie(string plate, string name)`

@@ -31,6 +47,6 @@ Determines whether a cookie exists in a plate of cookies like `document.cookie`.

``` js
let exists = Crumble.hasCookie(document.cookie, 'cookie');
let exists = hasCookie(document.cookie, 'cookie');
```
### `string Crumble#setCookie(Object crumbs [, string value])`
### `string setCookie(Object crumbs [, string value])`

@@ -51,3 +67,3 @@ Creates a string that will set a cookie when assigned to a plate like `document.cookie`.

``` js
document.cookie = Crumble.setCookie(
document.cookie = setCookie(
{

@@ -65,3 +81,3 @@ name : 'name',

``` js
document.cookie = Crumble.setCookie(
document.cookie = setCookie(
{

@@ -78,3 +94,3 @@ name : 'name',

### `string Crumble#removeCookie(Object crumbs)`
### `string removeCookie(Object crumbs)`

@@ -92,3 +108,3 @@ Creates a string that will remove a cookie when assigned to a plate like `document.cookie`.

``` js
document.cookie = Crumble.removeCookie(
document.cookie = removeCookie(
{

@@ -114,3 +130,3 @@ name : 'name',

You can build a browser entry point that is ES5 compatible and minified:
You can build UMD and ESM versions of this module that are both ES5 compatible and minified:

@@ -126,3 +142,3 @@ ``` sh

``` sh
npm run test
npm test
```

@@ -129,0 +145,0 @@

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