Comparing version 1.0.3 to 1.0.4
@@ -9,2 +9,4 @@ var sanitize_input = function(input) { | ||
input = input.replace(/"/g, '\\"'); | ||
// colons (:) must be replaced with escaped colons (\\:) | ||
input = input.replace(/:/g, '\\:'); | ||
return input; | ||
@@ -11,0 +13,0 @@ }; |
@@ -7,3 +7,3 @@ { | ||
"keywords": ["pg", "postgres", "hstore"], | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "lib/index.js", | ||
@@ -10,0 +10,0 @@ "homepage": "https://github.com/scarney81/pg-hstore", |
@@ -0,1 +1,3 @@ | ||
[](https://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME]) | ||
pg-hstore | ||
@@ -35,2 +37,2 @@ =========== | ||
}); | ||
``` | ||
``` |
@@ -78,2 +78,11 @@ /*globals it, describe */ | ||
}); | ||
}); | ||
it('should hstore encode colon correctly', function(done) { | ||
var source = { 'foo': "with:colon" }; | ||
hstore.stringify(source, function(target) { | ||
should.exist(target); | ||
target.should.equal('"foo"=>"with\\:colon"'); | ||
done(); | ||
}); | ||
}); | ||
}); |
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
8859
9
192
38
0