Socket
Socket
Sign inDemoInstall

create.js

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.9 to 0.1.0

2

build/create.js

@@ -228,3 +228,3 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.create=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

for (var property in arg) {
if (property !== null && arg[property] !== null && utils.hasProp(arg, property)) {
if (property !== null && arg[property] !== undefined && utils.hasProp(arg, property)) {
element.setAttribute(property, arg[property]);

@@ -231,0 +231,0 @@ }

@@ -1,1 +0,1 @@

!function(b){if("object"==typeof exports&&"undefined"!=typeof module){module.exports=b()}else{if("function"==typeof define&&define.amd){define([],b)}else{var a;"undefined"!=typeof window?a=window:"undefined"!=typeof global?a=global:"undefined"!=typeof self&&(a=self),a.create=b()}}}(function(){var d,b,a;return(function c(f,k,h){function g(q,n){if(!k[q]){if(!f[q]){var m=typeof require=="function"&&require;if(!n&&m){return m(q,!0)}if(e){return e(q,!0)}var p=new Error("Cannot find module '"+q+"'");throw p.code="MODULE_NOT_FOUND",p}var i=k[q]={exports:{}};f[q][0].call(i.exports,function(l){var o=f[q][1][l];return g(o?o:l)},i,i.exports,c,f,k,h)}return k[q].exports}var e=typeof require=="function"&&require;for(var j=0;j<h.length;j++){g(h[j])}return g})({1:[function(h,k,f){var l=h("./lib/replace");var e=h("./lib/utils");var j=e.types;var g=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","content","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","shadow","small","source","span","strong","style","sub","summary","sup","table","tbody","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];var i=new Object;g.forEach(function(m){i[m]=function(z){var z=z||{};var s=document.createElement(m);var n=z.context||{};var v=z.escape||true;var q=z.classes||"";var u=z.content||null;var w=z.appendTo||null;delete z.context;delete z.escape;delete z.classes;delete z.content;delete z.appendTo;if(q){e.add(s,q)}if(u){if(j.isElement(u)){s.appendChild(u)}else{if(j.isString(u)){var y=i.fragment();var t=n?l(u,n):u;s.innerHTML=t}else{if(j.isFunction(u)){children=u.call(null,n);s.appendChild(children)}else{if(j.isArray(u)){for(var r=0,p=u.length;r<p;r++){var x=u[r];if(j.isElement(x)){s.appendChild(x)}else{if(j.isString(x)){var y=i.fragment();y.innerHTML=x;s.appendChild(y)}else{if(j.isFunction(x)){var o=x.call();if(j.isElement(o)){s.appendChild(o)}}}}}}}}}}e.add(s,z);if(w){if(j.isElement(w)){w.appendChild(s)}}return s}});i.fragment=function(){if(!arguments.length){return document.createDocumentFragment()}};i.list=function(r,q){var n=i.fragment();for(var p=0,m=r.length;p<m;p++){var o=q.call(null,r[p]);n.appendChild(o)}return n};k.exports=i},{"./lib/replace":2,"./lib/utils":3}],2:[function(g,j,f){j.exports=k;var i={"<":"&lt;",">":"&gt;","'":"&#39;","&":"&amp;",'"':"&quot;","/":"&#x2F;"};function e(l){return String(l).replace(/[&<>"'\/]/g,function(m){return i[m]})}function h(l){return function(m,n){if(m.substring(0,2)=="{{"&&m.substring(m.length-2)=="}}"){return"{"+n+"}"}if(!l.hasOwnProperty(n)){return m}if(typeof l[n]=="function"){return l[n]()}return e(l[n])}}function k(m){var l;if(arguments[1]&&typeof arguments[1]=="object"){l=arguments[1]}else{l=Array.prototype.slice.call(arguments,1)}return String(m).replace(/\{\{(.+?)\}\}/g,h(l))}},{}],3:[function(g,j,f){var e={};var i={isElement:function(k){return k.nodeName&&(k.nodeType===1||k.nodeType===9||k.nodeType===11)},isString:function(k){return Object.prototype.toString.call(k)==="[object String]"},isArray:function(k){return Object.prototype.toString.call(k)==="[object Array]"},isObject:function(k){return k!==null&&Object.prototype.toString.call(k)==="[object Object]"},isFunction:function(k){return Object.prototype.toString.call(k)==="[object Function]"}};var h={get:function(k){return k.classList?k.classList:k.className.split(/\s+/)},has:function(l,k){return l.classList?l.classList.contains(k):!!~e.index(h.get(l),k)},add:function(m,l){l=l.trim();if(m.classList){return m.classList.add(l)}h=h.get(m);var k=e.index(h,l);if(!~k){h.push(l)}m.className=h.join(" ");return m},remove:function(m,l){l=l.trim();if(m.classList){return m.classList.remove(l)}h=h.get(m);var k=k(h,l);if(~k){h.splice(k,1)}m.className=h.join(" ");return m},toggleClass:function(l,k){k=k.trim();if(l.classList){return l.classList.toggle(k)}return h.has(l,k)?h.remove(l,k):h.add(l,k)}};e.types=i;e.index=function(l,k){return Array.prototype.indexOf.call(l,k)};e.hasProp=function(k,l){return k!==null&&Object.prototype.hasOwnProperty.call(k,l)};e.add=function(r){var p=Array.prototype.slice.call(arguments,1);for(var q=0,o=p.length;q<o;q++){var m=p[q];if(i.isString(m)){h.add(r,m)}else{if(i.isArray(m)){for(var n=0,k=m.length;n<k;n++){h.add(r,m[n])}}else{if(i.isObject(m)){for(var s in m){if(s!==null&&m[s]!==null&&e.hasProp(m,s)){r.setAttribute(s,m[s])}}}}}}return r};j.exports=e},{}]},{},[1])(1)});
!function(b){if("object"==typeof exports&&"undefined"!=typeof module){module.exports=b()}else{if("function"==typeof define&&define.amd){define([],b)}else{var a;"undefined"!=typeof window?a=window:"undefined"!=typeof global?a=global:"undefined"!=typeof self&&(a=self),a.create=b()}}}(function(){var d,b,a;return(function c(f,k,h){function g(q,n){if(!k[q]){if(!f[q]){var m=typeof require=="function"&&require;if(!n&&m){return m(q,!0)}if(e){return e(q,!0)}var p=new Error("Cannot find module '"+q+"'");throw p.code="MODULE_NOT_FOUND",p}var i=k[q]={exports:{}};f[q][0].call(i.exports,function(l){var o=f[q][1][l];return g(o?o:l)},i,i.exports,c,f,k,h)}return k[q].exports}var e=typeof require=="function"&&require;for(var j=0;j<h.length;j++){g(h[j])}return g})({1:[function(h,k,f){var l=h("./lib/replace");var e=h("./lib/utils");var j=e.types;var g=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","content","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","shadow","small","source","span","strong","style","sub","summary","sup","table","tbody","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];var i=new Object;g.forEach(function(m){i[m]=function(z){var z=z||{};var s=document.createElement(m);var n=z.context||{};var v=z.escape||true;var q=z.classes||"";var u=z.content||null;var w=z.appendTo||null;delete z.context;delete z.escape;delete z.classes;delete z.content;delete z.appendTo;if(q){e.add(s,q)}if(u){if(j.isElement(u)){s.appendChild(u)}else{if(j.isString(u)){var y=i.fragment();var t=n?l(u,n):u;s.innerHTML=t}else{if(j.isFunction(u)){children=u.call(null,n);s.appendChild(children)}else{if(j.isArray(u)){for(var r=0,p=u.length;r<p;r++){var x=u[r];if(j.isElement(x)){s.appendChild(x)}else{if(j.isString(x)){var y=i.fragment();y.innerHTML=x;s.appendChild(y)}else{if(j.isFunction(x)){var o=x.call();if(j.isElement(o)){s.appendChild(o)}}}}}}}}}}e.add(s,z);if(w){if(j.isElement(w)){w.appendChild(s)}}return s}});i.fragment=function(){if(!arguments.length){return document.createDocumentFragment()}};i.list=function(r,q){var n=i.fragment();for(var p=0,m=r.length;p<m;p++){var o=q.call(null,r[p]);n.appendChild(o)}return n};k.exports=i},{"./lib/replace":2,"./lib/utils":3}],2:[function(g,j,f){j.exports=k;var i={"<":"&lt;",">":"&gt;","'":"&#39;","&":"&amp;",'"':"&quot;","/":"&#x2F;"};function e(l){return String(l).replace(/[&<>"'\/]/g,function(m){return i[m]})}function h(l){return function(m,n){if(m.substring(0,2)=="{{"&&m.substring(m.length-2)=="}}"){return"{"+n+"}"}if(!l.hasOwnProperty(n)){return m}if(typeof l[n]=="function"){return l[n]()}return e(l[n])}}function k(m){var l;if(arguments[1]&&typeof arguments[1]=="object"){l=arguments[1]}else{l=Array.prototype.slice.call(arguments,1)}return String(m).replace(/\{\{(.+?)\}\}/g,h(l))}},{}],3:[function(g,j,f){var e={};var i={isElement:function(k){return k.nodeName&&(k.nodeType===1||k.nodeType===9||k.nodeType===11)},isString:function(k){return Object.prototype.toString.call(k)==="[object String]"},isArray:function(k){return Object.prototype.toString.call(k)==="[object Array]"},isObject:function(k){return k!==null&&Object.prototype.toString.call(k)==="[object Object]"},isFunction:function(k){return Object.prototype.toString.call(k)==="[object Function]"}};var h={get:function(k){return k.classList?k.classList:k.className.split(/\s+/)},has:function(l,k){return l.classList?l.classList.contains(k):!!~e.index(h.get(l),k)},add:function(m,l){l=l.trim();if(m.classList){return m.classList.add(l)}h=h.get(m);var k=e.index(h,l);if(!~k){h.push(l)}m.className=h.join(" ");return m},remove:function(m,l){l=l.trim();if(m.classList){return m.classList.remove(l)}h=h.get(m);var k=k(h,l);if(~k){h.splice(k,1)}m.className=h.join(" ");return m},toggleClass:function(l,k){k=k.trim();if(l.classList){return l.classList.toggle(k)}return h.has(l,k)?h.remove(l,k):h.add(l,k)}};e.types=i;e.index=function(l,k){return Array.prototype.indexOf.call(l,k)};e.hasProp=function(k,l){return k!==null&&Object.prototype.hasOwnProperty.call(k,l)};e.add=function(r){var p=Array.prototype.slice.call(arguments,1);for(var q=0,o=p.length;q<o;q++){var m=p[q];if(i.isString(m)){h.add(r,m)}else{if(i.isArray(m)){for(var n=0,k=m.length;n<k;n++){h.add(r,m[n])}}else{if(i.isObject(m)){for(var s in m){if(s!==null&&m[s]!==undefined&&e.hasProp(m,s)){r.setAttribute(s,m[s])}}}}}}return r};j.exports=e},{}]},{},[1])(1)});

@@ -90,3 +90,3 @@ var utils = {};

for (var property in arg) {
if (property !== null && arg[property] !== null && utils.hasProp(arg, property)) {
if (property !== null && arg[property] !== undefined && utils.hasProp(arg, property)) {
element.setAttribute(property, arg[property]);

@@ -93,0 +93,0 @@ }

{
"name": "create.js",
"version": "0.0.9",
"version": "0.1.0",
"description": "declarative dom creation",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc