Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "percy", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "a persistence layer", | ||
@@ -5,0 +5,0 @@ "main": "percy.js", |
11
percy.js
@@ -143,6 +143,8 @@ var kgo = require('kgo'), | ||
function createKey(){ | ||
var keyParts = arrayProto.slice.call(arguments); | ||
keyParts.unshift(this.entityType); | ||
return keyParts.join(':'); | ||
function createKey(key){ | ||
if(!Array.isArray(key)){ | ||
key = [key]; | ||
} | ||
key.unshift(this.entityType); | ||
return key.join(':'); | ||
} | ||
@@ -167,2 +169,3 @@ | ||
} | ||
Percy.prototype.get = get; | ||
@@ -169,0 +172,0 @@ Percy.prototype.set = set; |
@@ -170,6 +170,6 @@ var test = require('grape'), | ||
percy.add('abc', {a:1}, function(error, model){ | ||
percy.add(['abc', '123'], {a:1}, function(error, model){ | ||
t.pass('model added'); | ||
percy.replace('abc', {b:2}, function(error, model){ | ||
percy.replace(['abc', '123'], {b:2}, function(error, model){ | ||
t.deepEqual(model, {b:2}, 'replace succeded'); | ||
@@ -176,0 +176,0 @@ }); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10047
311
1