Skip to content

Commit

Permalink
Delete processing to false in the option value
Browse files Browse the repository at this point in the history
  • Loading branch information
alik0211 committed Jan 13, 2019
1 parent 0be06e7 commit 1dc4c19
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
9 changes: 0 additions & 9 deletions __tests__/hardtack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -20,7 +20,7 @@
"size-limit": [
{
"path": "dist/hardtack.min.js",
"limit": "417 B",
"limit": "409 B",
"webpack": false
}
],
Expand Down
4 changes: 0 additions & 4 deletions src/hardtack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ export default {
.map(optionName => {
const optionValue = options[optionName];

if (optionValue === false) {
return;
}

if (optionValue === true) {
return `;${optionName}`;
}
Expand Down

0 comments on commit 1dc4c19

Please sign in to comment.