+5
-13
@@ -1,9 +0,1 @@ | ||
| /*{ | ||
| "name": "ninjson", | ||
| "version": "1.0.0", | ||
| "homepage": "https://github.com/afanasy/ninjson", | ||
| "author": "Afanasy Kurakin", | ||
| "license": "MIT" | ||
| }*/ | ||
| $.nj = function (d) { | ||
@@ -28,3 +20,3 @@ if (_.isString(d)) { | ||
| } | ||
| d = d.split('.') | ||
| d = d.split('.') | ||
| if (d[0] === '') | ||
@@ -39,7 +31,7 @@ d[0] = 'div' | ||
| } | ||
| if (_.isObject(d)) { | ||
| if (_.isObject(d)) { | ||
| var box = _.map(d, function (value, key) { | ||
| if (_.isString(value)) | ||
| return $.nj(key).text(value) | ||
| else | ||
| else | ||
| return $.nj(key).nj(value) | ||
@@ -55,6 +47,6 @@ }) | ||
| var box = $(this) | ||
| if (!_.isString(d) && !_.isArray(d) && _.isObject(d) && !_.keys(d)[0].match(/\.|\[|\]|#/)) { | ||
| if (!_.isString(d) && !_.isArray(d) && _.isObject(d) && (!_.size(d) || !_.keys(d)[0].match(/\.|\[|\]|#/))) { | ||
| _.each(d, function (value, key) { | ||
| if (_.isFunction(box[key])) { | ||
| box[key](value) | ||
| box[key](value) | ||
| } | ||
@@ -61,0 +53,0 @@ }) |
+1
-1
| { | ||
| "name": "ninjson", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Jquery JSON to HTML parser ", | ||
@@ -5,0 +5,0 @@ "main": "ninjson.js", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
5464
-2.71%81
-7.95%