universal-cookie
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,2 +7,3 @@ 'use strict'; | ||
exports.isNode = isNode; | ||
exports.cleanCookies = cleanCookies; | ||
@@ -16,3 +17,9 @@ var _isNode = require('is-node'); | ||
function isNode() { | ||
return process.env.NODE_ENV === 'test' && typeof global.MOCK_IS_NODE === 'undefined' ? _isNode2.default : global.MOCK_IS_NODE; | ||
return process.env.NODE_ENV === 'test' && typeof global.MOCK_IS_NODE !== 'undefined' ? global.MOCK_IS_NODE : _isNode2.default; | ||
} | ||
function cleanCookies() { | ||
document.cookie.split(';').forEach(function (c) { | ||
document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/'); | ||
}); | ||
} |
{ | ||
"name": "universal-cookie", | ||
"version": "2.0.0", | ||
"description": "Universal cookies made easy for client and server side", | ||
"version": "2.0.1", | ||
"description": "Universal cookies for JavaScript", | ||
"main": "lib/index.js", | ||
@@ -23,6 +23,3 @@ "files": [ | ||
"scripts": { | ||
"build": "rimraf lib && babel src -d lib --ignore __tests__", | ||
"lint": "eslint --ext .js .", | ||
"test": "npm run lint && karma start --single-run", | ||
"watch": "karma start" | ||
"build": "rimraf lib && babel src -d lib --ignore __tests__" | ||
}, | ||
@@ -33,3 +30,7 @@ "dependencies": { | ||
"object-assign": "^4.1.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"rimraf": "^2.6.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6081
124
2