diff --git a/README.md b/README.md index fba6344..93a6625 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ## Features - Simple API -- Ultra-light (**417 bytes** gzipped) +- Ultra-light (**409 bytes** gzipped) - Encoding of forbidden characters - Use as a [module](#module) or add to your [browser](#browser) diff --git a/__tests__/hardtack.js b/__tests__/hardtack.js index 91f2bf3..4dd414a 100644 --- a/__tests__/hardtack.js +++ b/__tests__/hardtack.js @@ -53,15 +53,6 @@ describe('set', () => { ).toBe(`symbols=${encodeURIComponent(user.symbols)};path=${options.path}`); }); - test('do not set options if false is passed', () => { - expect( - hardtack.set('surname', user.surname, { - expires: false, - secure: false, - }) - ).toBe(`surname=${user.surname}`); - }); - test('set what is before the semicolon in the option value', () => { expect( hardtack.set('surname', user.surname, { diff --git a/package.json b/package.json index 801e639..05912d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hardtack", - "description": "An ultra-light (417 bytes) library for working with cookies in JavaScript", + "description": "An ultra-light (409 bytes) library for working with cookies in JavaScript", "version": "3.0.0", "main": "dist/hardtack.cjs.js", "module": "dist/hardtack.esm.js", @@ -20,7 +20,7 @@ "size-limit": [ { "path": "dist/hardtack.min.js", - "limit": "417 B", + "limit": "409 B", "webpack": false } ], diff --git a/src/hardtack.js b/src/hardtack.js index b481a2b..1fb0ce4 100644 --- a/src/hardtack.js +++ b/src/hardtack.js @@ -8,10 +8,6 @@ export default { .map(optionName => { const optionValue = options[optionName]; - if (optionValue === false) { - return; - } - if (optionValue === true) { return `;${optionName}`; }