rison-node
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -121,2 +121,7 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rison = f()}})(function(){var define,module,exports; | ||
}, | ||
enc = function (v) { | ||
if (v && typeof v.toJSON === 'function') v = v.toJSON(); | ||
var fn = s[typeof v]; | ||
if (fn) return fn(v); | ||
}, | ||
s = { | ||
@@ -126,13 +131,9 @@ array: function (x) { | ||
for (i = 0; i < l; i += 1) { | ||
v = x[i]; | ||
f = s[typeof v]; | ||
if (f) { | ||
v = f(v); | ||
if (typeof v == 'string') { | ||
if (b) { | ||
a[a.length] = ','; | ||
} | ||
a[a.length] = v; | ||
b = true; | ||
v = enc(x[i]); | ||
if (typeof v == 'string') { | ||
if (b) { | ||
a[a.length] = ','; | ||
} | ||
a[a.length] = v; | ||
b = true; | ||
} | ||
@@ -172,13 +173,9 @@ } | ||
i = ks[ki]; | ||
v = x[i]; | ||
f = s[typeof v]; | ||
if (f) { | ||
v = f(v); | ||
if (typeof v == 'string') { | ||
if (b) { | ||
a[a.length] = ','; | ||
} | ||
a.push(s.string(i), ':', v); | ||
b = true; | ||
v = enc(x[i]); | ||
if (typeof v == 'string') { | ||
if (b) { | ||
a[a.length] = ','; | ||
} | ||
a.push(s.string(i), ':', v); | ||
b = true; | ||
} | ||
@@ -219,3 +216,3 @@ } | ||
rison.encode = function (v) { | ||
return s[typeof v](v); | ||
return enc(v); | ||
}; | ||
@@ -222,0 +219,0 @@ |
@@ -0,1 +1,5 @@ | ||
# 0.3.0 (2015-12-18) | ||
- Handle Date type values via `.toJSON()` | ||
# 0.2.0 (2015-12-18) | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "rison-node", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"author": "Nanonid (https://github.com/Nanonid)", | ||
@@ -5,0 +5,0 @@ "description": "data serialization format optimized for compactness in URIs", |
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
37368
452