Comparing version 0.3.4 to 0.3.5
@@ -62,10 +62,10 @@ var util = require('./util') | ||
, i, l, obj, maskedObj | ||
if (!util.isArray(arr)) return _properties(arr, mask) | ||
if (util.isEmpty(arr)) return arr | ||
if (!util.isArray(arr)) return _properties(arr, mask) | ||
for (i = 0, l = arr.length; i < l; i++) { | ||
obj = arr[i] | ||
maskedObj = _properties(obj, mask) | ||
if (maskedObj) ret.push(maskedObj) | ||
if ('undefined' !== typeof maskedObj) ret.push(maskedObj) | ||
} | ||
return ret.length ? ret : undefined | ||
} |
{ | ||
"name": "json-mask", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Tiny language and engine for selecting specific parts of a JS object, hiding the rest.", | ||
@@ -27,3 +27,6 @@ "main": "lib/index", | ||
"devDependencies": { | ||
"mocha": "~1.12.0" | ||
"browserify": "^10.2.6", | ||
"istanbul": "^0.3.17", | ||
"mocha": "~1.12.0", | ||
"uglifyjs": "^2.4.10" | ||
}, | ||
@@ -30,0 +33,0 @@ "testling": { |
@@ -164,4 +164,4 @@ # JSON Mask [![Build Status](https://secure.travis-ci.org/nemtsov/json-mask.png)](http://travis-ci.org/nemtsov/json-mask) [![NPM version](https://badge.fury.io/js/json-mask.png)](http://badge.fury.io/js/json-mask) | ||
**jsDelivr** | ||
- `//cdn.jsdelivr.net/jsonmask/0.3.0/jsonMask.js` | ||
- `//cdn.jsdelivr.net/jsonmask/0.3.0/jsonMask.min.js` | ||
- `//cdn.jsdelivr.net/jsonmask/0.3.4/jsonMask.js` | ||
- `//cdn.jsdelivr.net/jsonmask/0.3.4/jsonMask.min.js` | ||
@@ -178,2 +178,2 @@ | ||
MIT. See LICENSE | ||
[MIT](/LICENSE) |
@@ -113,2 +113,14 @@ var mask = require('../lib') | ||
, e: [{i: 1}, {i: 2}] | ||
}, { | ||
m: 'foo(bar)' | ||
, o: { foo: 1234 } | ||
, e: null | ||
}, { | ||
m: 'a' | ||
, o: { a: [0, 0] } | ||
, e: { a: [0, 0] } | ||
}, { | ||
m: 'a' | ||
, o: { a: [1, 0, 1] } | ||
, e: { a: [1, 0, 1] } | ||
}] | ||
@@ -115,0 +127,0 @@ |
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
73700
736
4