Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crel

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crel - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

14

crel.js

@@ -75,6 +75,12 @@ //Copyright (C) 2012 Kory Nunn

appendChild = function(element, child) {
if(!crel[isNodeString](child)){
child = d.createTextNode(child);
}
element.appendChild(child);
if (isArray(child)) {
child.map(function(subChild){
appendChild(element, subChild);
});
return;
}
if(!crel[isNodeString](child)){
child = d.createTextNode(child);
}
element.appendChild(child);
};

@@ -81,0 +87,0 @@

@@ -8,12 +8,14 @@ {

],
"version": "3.0.1",
"version": "3.1.0",
"main": "crel.js",
"dependencies": {},
"devDependencies": {
"tape-run": "^2.1.3",
"browserify": "^14.4.0",
"tape": "^3.0.3",
"tape-run": "^3.0.0",
"uglify-js": "^2.4.16"
},
"scripts": {
"test": "browserify ./test | tape-run",
"test": "browserify ./test/index.js | tape-run",
"testBuild": "browserify ./test/index.js > ./test/index.browser.js",
"build": "uglifyjs crel.js -m -c > crel.min.js"

@@ -20,0 +22,0 @@ },

@@ -50,2 +50,28 @@ var crel = require('../'),

test('append array children', function(t) {
t.plan(1);
var testElement = crel('div', [1, 2, 3]);
t.equal(
testElement.childNodes.length,
3
);
t.end();
});
test('append deep array children', function(t) {
t.plan(1);
var testElement = crel('div', [[1, 2, 3]]);
t.equal(
testElement.childNodes.length,
3
);
t.end();
});
test('add attributes to an existing element', function(t) {

@@ -52,0 +78,0 @@ t.plan(2);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc