Skip to content

Commit

Permalink
[fix] Use koekiemonster
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Jun 19, 2017
1 parent 92d7d9d commit e916d95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions index.js
@@ -1,7 +1,7 @@
'use strict';

var has = Object.prototype.hasOwnProperty
, monster = require('cookie-monster')
, monster = require('koekiemonster')
, qs = require('querystringify')
, storage = {}
, prefix = '§'
Expand All @@ -23,7 +23,7 @@ cookie = monster('undefined' !== typeof document ? document : {});
function update() {
if (!koekje.supported) return;

var data = cookie.get('koekje')
var data = cookie.getItem('koekje')
, length = 0
, key;

Expand Down Expand Up @@ -69,7 +69,7 @@ var koekje = module.exports = {
*/
setItem: function setItem(key, value) {
storage[key] = value;
cookie.set('koekje', qs.stringify(storage, prefix));
cookie.setItem('koekje', qs.stringify(storage, prefix));

koekje.length++;
},
Expand All @@ -83,7 +83,7 @@ var koekje = module.exports = {
*/
removeItem: function removeItem(key) {
delete storage[key];
cookie.set('koekje', qs.stringify(storage, prefix));
cookie.setItem('koekje', qs.stringify(storage, prefix));

koekje.length--;
},
Expand All @@ -97,7 +97,7 @@ var koekje = module.exports = {
clear: function clear() {
storage = {};

cookie.set('koekje', '', {
cookie.setItem('koekje', '', {
expires: new Date(0)
});

Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -29,13 +29,13 @@
},
"homepage": "https://github.com/unshiftio/koekje",
"devDependencies": {
"assume": "1.3.x",
"istanbul": "0.3.x",
"mocha": "2.3.x",
"pre-commit": "1.1.x"
"assume": "1.5.x",
"istanbul": "0.4.x",
"mocha": "3.4.x",
"pre-commit": "1.2.x"
},
"dependencies": {
"cookie-monster": "0.1.x",
"querystringify": "0.0.x"
"koekiemonster": "1.0.x",
"querystringify": "1.0.x"
}
}

0 comments on commit e916d95

Please sign in to comment.