Socket
Socket
Sign inDemoInstall

j2c

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

j2c - npm Package Compare versions

Comparing version 0.11.2 to 0.11.3

coverage/lcov-report/plugins/postcss/src/index.html

2

dist/j2c.amd.min.js

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

define(function(){"use strict";function n(n,e,r,l,s,a){l=[];for(a in e)if(f.call(e,a))for(s in n)f.call(n,s)&&l.push(t(n[s],e[a],r));return l}function t(n,t,e){return e&&(/^[-\w$]+$/.test(t)&&":-error-bad-sub-selector-"+t||/&/.test(t)&&t.replace(/&/g,n))||n+t}function e(n){return"-"+n.toLowerCase()}function r(n,t,l,s,a,o,i,u,g){if(null!=n)if(/\$/.test(l))for(g in l=l.split("$"))f.call(l,g)&&r(n,t,l[g],s,a,o);else switch(c.call(n=n.valueOf())){case h:for(i=0;i<n.length;i++)r(n[i],t,l,s,a,o);break;case p:l=l&&l+"-";for(i in n)if(f.call(n,i))if(u=n[i],/\$/.test(i))for(g in i=i.split("$"))f.call(i,g)&&r(u,t,l+i[g],s,a,o);else r(u,t,l+i,s,a,o);break;default:for(i=l.replace(/_/g,"-").replace(/[A-Z]/g,e),!a||"animation-name"!=i&&"animation"!=i||(n=n.split(",").map(function(n){return n.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,o.l)}).join(",")),/^animation|^transition/.test(i)&&(s=["webkit"]),i=i.replace(/^@/,"*"),g=0;g<s.length;g++)t.push("-",s[g],"-",i,i?":":"",n,";\n");t.push(i,i?":":"",n,";\n")}}function l(n,t,e,r,l,a,o,i){var f;if(/^@(?:namespace|import|charset)$/.test(n))if(c.call(t)==h)for(f=0;f<t.length;f++)e.push(n," ",t[f],";\n");else e.push(n," ",t,";\n");else if(/^@keyframes /.test(n))n=o?n.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,i.l):n,e.push("@-webkit-",n.slice(1)," {\n"),s(t,e,"","",["webkit"]),e.push("}\n"),e.push(n," {\n"),s(t,e,"","",a,o,i),e.push("}\n");else if(/^@extends?$/.test(n)){for(;f=w.exec(l);)n=f[4];if(null==n||!o)return void e.push("@-error-cannot-extend-in-global-context ",JSON.stringify(l),";\n");if(/^@extends?$/.test(n))return void e.push("@-error-no-class-to-extend-in ",JSON.stringify(l),";\n");i.e(c.call(t)==h?t.map(function(n){return n.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l)}).join(" "):t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l),n)}else/^@(?:font-face$|viewport$|page )/.test(n)?s(t,e,n,n,u):/^@global$/.test(n)?s(t,e,r,l,a,0,i):/^@local$/.test(n)?s(t,e,r,l,a,1,i):/^@(?:media |supports |document )./.test(n)?(e.push(n," {\n"),s(t,e,r,l,a,o,i),e.push("}\n")):e.push("@-error-unsupported-at-rule ",JSON.stringify(n),";\n")}function s(e,a,o,i,u,f,w){var m,b,d,$;switch(c.call(e)){case h:for(m=0;m<e.length;m++)s(e[m],a,o,i,u,f,w);break;case p:for(m in e)d=e[m],o&&/^[-\w$]+$/.test(m)?($||($=1,a.push(o||"*"," {\n")),r(d,a,m,u,f,w)):/^@/.test(m)?($=$&&a.push("}\n")&&0,l(m,d,a,o,i,u,f,w)):($=$&&a.push("}\n")&&0,s(d,a,(b=/,/.test(o)||o&&/,/.test(m))?n(o.split(","),(f?m.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):m).split(","),o).join(","):t(o,f?m.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):m,o),b?n(i.split(","),m.split(","),i).join(","):t(i,m,i),u,f,w));$&&a.push("}\n");break;case g:a.push(o||":-error-no-selector"," {\n"),r(e,a,"",u,f,w),a.push("}\n")}}function a(t){function e(n,t){for(t=0;t<l.length;t++)n=l[t](n)||n;return n.join("")}t=t||{};var l=[];return t.use=function(){for(var n=arguments,e=0;e<n.length;e++)l.push(n[e]);return t},t.sheet=function(n,t){1===arguments.length&&(t=n,n={});var r,l=m+b++,a={},o=[];for(r in n)r-0!=r-0&&f.call(n,r)&&(a[r]=n[r]);s(t,o,"","",u,1,{e:function(n,t){var e=a[t];a[t]=e.slice(0,e.lastIndexOf(" ")+1)+n+" "+e.slice(e.lastIndexOf(" ")+1)},l:function(n,t,e,r,s){return e?t+e:(a[s]||(a[s]=s+l),t+r+a[s].match(/\S+$/))}}),o=new String(e(o));for(r in a)f.call(a,r)&&(o[r]=a[r]);return o},t.inline=function(n,t,l){return 1===arguments.length&&(t=n,n={}),r(t,l=[],"",u,1,{l:function(t,e,r,l,s){return r?e+r:n[s]?e+l+n[s]:s}}),e(l)},t.prefix=function(t,e){return n(e.map(function(n){return"-"+n+"-"}).concat([""]),[t])},t}function o(n,t,e){return e={},e[n]=t,e}var i={},u=[],c=i.toString,f=i.hasOwnProperty,p=c.call(i),h=c.call(u),g=c.call(""),w=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,m="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",b=0;return a.global=function(n){return":global("+n+")"},a.kv=o,a.at=function d(n,t,e){if(arguments.length<3){var r=d.bind.apply(d,[null].concat([].slice.call(arguments,0)));return r.toString=function(){return"@"+n+" "+t},r}return o("@"+n+" "+t,e)},a(a),delete a.use,a});
define(function(){"use strict";function n(n,e,r,l,o,s){l=[];for(s in e)if(f.call(e,s))for(o in n)f.call(n,o)&&l.push(t(n[o],e[s],r));return l}function t(n,t,e){return e&&(/^[-\w$]+$/.test(t)&&":-error-bad-sub-selector-"+t||/&/.test(t)&&t.replace(/&/g,n))||n+t}function e(n){return"-"+n.toLowerCase()}function r(n,t,l,o,s,a,i,u,g){if(null!=n)if(/\$/.test(l))for(g in l=l.split("$"))f.call(l,g)&&r(n,t,l[g],o,s,a);else switch(c.call(n=n.valueOf())){case h:for(i=0;i<n.length;i++)r(n[i],t,l,o,s,a);break;case p:l=l&&l+"-";for(i in n)if(f.call(n,i))if(u=n[i],/\$/.test(i))for(g in i=i.split("$"))f.call(i,g)&&r(u,t,l+i[g],o,s,a);else r(u,t,l+i,o,s,a);break;default:for(i=l.replace(/_/g,"-").replace(/[A-Z]/g,e),!s||"animation-name"!=i&&"animation"!=i||(n=n.split(",").map(function(n){return n.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,a.l)}).join(",")),/^animation|^transition/.test(i)&&(o=["webkit"]),i=i.replace(/^@/,"*"),g=0;g<o.length;g++)t.push("-",o[g],"-",i,i?":":"",n,";\n");t.push(i,i?":":"",n,";\n")}}function l(n,t,e,r,l,s,a,i){var f;if(/^@(?:namespace|import|charset)$/.test(n))if(c.call(t)==h)for(f=0;f<t.length;f++)e.push(n," ",t[f],";\n");else e.push(n," ",t,";\n");else if(/^@keyframes /.test(n))n=a?n.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,i.l):n,e.push("@-webkit-",n.slice(1)," {\n"),o(t,e,"","",["webkit"]),e.push("}\n"),e.push(n," {\n"),o(t,e,"","",s,a,i),e.push("}\n");else if(/^@extends?$/.test(n)){for(;f=w.exec(l);)n=f[4];if(null==n||!a)return void e.push("@-error-cannot-extend-in-global-context ",JSON.stringify(l),";\n");if(/^@extends?$/.test(n))return void e.push("@-error-no-class-to-extend-in ",JSON.stringify(l),";\n");i.e(c.call(t)==h?t.map(function(n){return n.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l)}).join(" "):t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l),n)}else/^@(?:font-face$|viewport$|page )/.test(n)?o(t,e,n,n,u):/^@global$/.test(n)?o(t,e,r,l,s,0,i):/^@local$/.test(n)?o(t,e,r,l,s,1,i):/^@(?:media |supports |document )./.test(n)?(e.push(n," {\n"),o(t,e,r,l,s,a,i),e.push("}\n")):e.push("@-error-unsupported-at-rule ",JSON.stringify(n),";\n")}function o(e,s,a,i,u,f,w){var b,d,m,$;switch(c.call(e)){case h:for(b=0;b<e.length;b++)o(e[b],s,a,i,u,f,w);break;case p:for(b in e)m=e[b],a&&/^[-\w$]+$/.test(b)?($||($=1,s.push(a||"*"," {\n")),r(m,s,b,u,f,w)):/^@/.test(b)?($=$&&s.push("}\n")&&0,l(b,m,s,a,i,u,f,w)):($=$&&s.push("}\n")&&0,o(m,s,(d=/,/.test(a)||a&&/,/.test(b))?n(a.split(","),(f?b.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):b).split(","),a).join(","):t(a,f?b.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):b,a),d?n(i.split(","),b.split(","),i).join(","):t(i,b,i),u,f,w));$&&s.push("}\n");break;case g:s.push(a||":-error-no-selector"," {\n"),r(e,s,"",u,f,w),s.push("}\n")}}function s(t){function e(n,t){for(t=0;t<l.length;t++)n=l[t](n)||n;return n.join("")}t=t||{};var l=[];return t.use=function(){for(var n=arguments,e=0;e<n.length;e++)l.push(n[e]);return t},t.sheet=function(n,t){1===arguments.length&&(t=n,n={});var r,l=b+d++,s={},a=[];for(r in n)r-0!=r-0&&f.call(n,r)&&(s[r]=n[r]);o(t,a,"","",u,1,{e:function(n,t){var e=s[t];s[t]=e.slice(0,e.lastIndexOf(" ")+1)+n+" "+e.slice(e.lastIndexOf(" ")+1)},l:function(n,t,e,r,o){return e?t+e:(s[o]||(s[o]=o+l),t+r+s[o].match(/\S+$/))}}),a=new String(e(a));for(r in s)f.call(s,r)&&(a[r]=s[r]);return a},t.inline=function(n,t,l){return 1===arguments.length&&(t=n,n={}),r(t,l=[],"",u,1,{l:function(t,e,r,l,o){return r?e+r:n[o]?e+l+n[o]:o}}),e(l)},t.prefix=function(t,e){return n(e.map(function(n){return"-"+n+"-"}).concat([""]),[t])},t}function a(n,t,e){return e={},e[n]=t,e}var i={},u=[],c=i.toString,f=i.hasOwnProperty,p=c.call(i),h=c.call(u),g=c.call(""),w=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,b="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",d=0;return s.global=function(n){return":global("+n+")"},s.kv=a,s.at=function n(t,e,r){if(arguments.length<3){var l=n.bind.apply(n,[null].concat([].slice.call(arguments,0)));return l.toString=function(){return"@"+t+" "+e},l}return a("@"+t+" "+e,r)},s(s),delete s.use,s});

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

"use strict";function cartesian(e,t,n,r,a,s){r=[];for(s in t)if(own.call(t,s))for(a in e)own.call(e,a)&&r.push(concat(e[a],t[s],n));return r}function concat(e,t,n){return n&&(/^[-\w$]+$/.test(t)&&":-error-bad-sub-selector-"+t||/&/.test(t)&&t.replace(/&/g,e))||e+t}function decamelize(e){return"-"+e.toLowerCase()}function declarations(e,t,n,r,a,s,l,o,c){if(null!=e)if(/\$/.test(n))for(c in n=n.split("$"))own.call(n,c)&&declarations(e,t,n[c],r,a,s);else switch(type.call(e=e.valueOf())){case ARRAY:for(l=0;l<e.length;l++)declarations(e[l],t,n,r,a,s);break;case OBJECT:n=n&&n+"-";for(l in e)if(own.call(e,l))if(o=e[l],/\$/.test(l))for(c in l=l.split("$"))own.call(l,c)&&declarations(o,t,n+l[c],r,a,s);else declarations(o,t,n+l,r,a,s);break;default:for(l=n.replace(/_/g,"-").replace(/[A-Z]/g,decamelize),!a||"animation-name"!=l&&"animation"!=l||(e=e.split(",").map(function(e){return e.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,s.l)}).join(",")),/^animation|^transition/.test(l)&&(r=["webkit"]),l=l.replace(/^@/,"*"),c=0;c<r.length;c++)t.push("-",r[c],"-",l,l?":":"",e,";\n");t.push(l,l?":":"",e,";\n")}}function at(e,t,n,r,a,s,l,o){var c;if(/^@(?:namespace|import|charset)$/.test(e))if(type.call(t)==ARRAY)for(c=0;c<t.length;c++)n.push(e," ",t[c],";\n");else n.push(e," ",t,";\n");else if(/^@keyframes /.test(e))e=l?e.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,o.l):e,n.push("@-webkit-",e.slice(1)," {\n"),sheet(t,n,"","",["webkit"]),n.push("}\n"),n.push(e," {\n"),sheet(t,n,"","",s,l,o),n.push("}\n");else if(/^@extends?$/.test(e)){for(;c=findClass.exec(a);)e=c[4];if(null==e||!l)return void n.push("@-error-cannot-extend-in-global-context ",JSON.stringify(a),";\n");if(/^@extends?$/.test(e))return void n.push("@-error-no-class-to-extend-in ",JSON.stringify(a),";\n");o.e(type.call(t)==ARRAY?t.map(function(e){return e.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,o.l)}).join(" "):t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,o.l),e)}else/^@(?:font-face$|viewport$|page )/.test(e)?sheet(t,n,e,e,emptyArray):/^@global$/.test(e)?sheet(t,n,r,a,s,0,o):/^@local$/.test(e)?sheet(t,n,r,a,s,1,o):/^@(?:media |supports |document )./.test(e)?(n.push(e," {\n"),sheet(t,n,r,a,s,l,o),n.push("}\n")):n.push("@-error-unsupported-at-rule ",JSON.stringify(e),";\n")}function sheet(e,t,n,r,a,s,l){var o,c,i,u;switch(type.call(e)){case ARRAY:for(o=0;o<e.length;o++)sheet(e[o],t,n,r,a,s,l);break;case OBJECT:for(o in e)i=e[o],n&&/^[-\w$]+$/.test(o)?(u||(u=1,t.push(n||"*"," {\n")),declarations(i,t,o,a,s,l)):/^@/.test(o)?(u=u&&t.push("}\n")&&0,at(o,i,t,n,r,a,s,l)):(u=u&&t.push("}\n")&&0,sheet(i,t,(c=/,/.test(n)||n&&/,/.test(o))?cartesian(n.split(","),(s?o.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,l.l):o).split(","),n).join(","):concat(n,s?o.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,l.l):o,n),c?cartesian(r.split(","),o.split(","),r).join(","):concat(r,o,r),a,s,l));u&&t.push("}\n");break;case STRING:t.push(n||":-error-no-selector"," {\n"),declarations(e,t,"",a,s,l),t.push("}\n")}}function j2c(e){function t(e,t){for(t=0;t<n.length;t++)e=n[t](e)||e;return e.join("")}e=e||{};var n=[];return e.use=function(){for(var t=arguments,r=0;r<t.length;r++)n.push(t[r]);return e},e.sheet=function(e,n){1===arguments.length&&(n=e,e={});var r,a=scope_root+counter++,s={},l=[];for(r in e)r-0!=r-0&&own.call(e,r)&&(s[r]=e[r]);sheet(n,l,"","",emptyArray,1,{e:function(e,t){var n=s[t];s[t]=n.slice(0,n.lastIndexOf(" ")+1)+e+" "+n.slice(n.lastIndexOf(" ")+1)},l:function(e,t,n,r,l){return n?t+n:(s[l]||(s[l]=l+a),t+r+s[l].match(/\S+$/))}}),l=new String(t(l));for(r in s)own.call(s,r)&&(l[r]=s[r]);return l},e.inline=function(e,n,r){return 1===arguments.length&&(n=e,e={}),declarations(n,r=[],"",emptyArray,1,{l:function(t,n,r,a,s){return r?n+r:e[s]?n+a+e[s]:s}}),t(r)},e.prefix=function(e,t){return cartesian(t.map(function(e){return"-"+e+"-"}).concat([""]),[e])},e}function kv(e,t,n){return n={},n[e]=t,n}var emptyObject={},emptyArray=[],type=emptyObject.toString,own=emptyObject.hasOwnProperty,OBJECT=type.call(emptyObject),ARRAY=type.call(emptyArray),STRING=type.call(""),findClass=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,scope_root="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",counter=0;j2c.global=function(e){return":global("+e+")"},j2c.kv=kv,j2c.at=function e(t,n,r){if(arguments.length<3){var a=e.bind.apply(e,[null].concat([].slice.call(arguments,0)));return a.toString=function(){return"@"+t+" "+n},a}return kv("@"+t+" "+n,r)},j2c(j2c),delete j2c.use,module.exports=j2c;
"use strict";function cartesian(e,t,n,r,a,l){r=[];for(l in t)if(own.call(t,l))for(a in e)own.call(e,a)&&r.push(concat(e[a],t[l],n));return r}function concat(e,t,n){return n&&(/^[-\w$]+$/.test(t)&&":-error-bad-sub-selector-"+t||/&/.test(t)&&t.replace(/&/g,e))||e+t}function decamelize(e){return"-"+e.toLowerCase()}function declarations(e,t,n,r,a,l,o,s,c){if(null!=e)if(/\$/.test(n))for(c in n=n.split("$"))own.call(n,c)&&declarations(e,t,n[c],r,a,l);else switch(type.call(e=e.valueOf())){case ARRAY:for(o=0;o<e.length;o++)declarations(e[o],t,n,r,a,l);break;case OBJECT:n=n&&n+"-";for(o in e)if(own.call(e,o))if(s=e[o],/\$/.test(o))for(c in o=o.split("$"))own.call(o,c)&&declarations(s,t,n+o[c],r,a,l);else declarations(s,t,n+o,r,a,l);break;default:for(o=n.replace(/_/g,"-").replace(/[A-Z]/g,decamelize),!a||"animation-name"!=o&&"animation"!=o||(e=e.split(",").map(function(e){return e.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,l.l)}).join(",")),/^animation|^transition/.test(o)&&(r=["webkit"]),o=o.replace(/^@/,"*"),c=0;c<r.length;c++)t.push("-",r[c],"-",o,o?":":"",e,";\n");t.push(o,o?":":"",e,";\n")}}function at(e,t,n,r,a,l,o,s){var c;if(/^@(?:namespace|import|charset)$/.test(e))if(type.call(t)==ARRAY)for(c=0;c<t.length;c++)n.push(e," ",t[c],";\n");else n.push(e," ",t,";\n");else if(/^@keyframes /.test(e))e=o?e.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,s.l):e,n.push("@-webkit-",e.slice(1)," {\n"),sheet(t,n,"","",["webkit"]),n.push("}\n"),n.push(e," {\n"),sheet(t,n,"","",l,o,s),n.push("}\n");else if(/^@extends?$/.test(e)){for(;c=findClass.exec(a);)e=c[4];if(null==e||!o)return void n.push("@-error-cannot-extend-in-global-context ",JSON.stringify(a),";\n");if(/^@extends?$/.test(e))return void n.push("@-error-no-class-to-extend-in ",JSON.stringify(a),";\n");s.e(type.call(t)==ARRAY?t.map(function(e){return e.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,s.l)}).join(" "):t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,s.l),e)}else/^@(?:font-face$|viewport$|page )/.test(e)?sheet(t,n,e,e,emptyArray):/^@global$/.test(e)?sheet(t,n,r,a,l,0,s):/^@local$/.test(e)?sheet(t,n,r,a,l,1,s):/^@(?:media |supports |document )./.test(e)?(n.push(e," {\n"),sheet(t,n,r,a,l,o,s),n.push("}\n")):n.push("@-error-unsupported-at-rule ",JSON.stringify(e),";\n")}function sheet(e,t,n,r,a,l,o){var s,c,i,u;switch(type.call(e)){case ARRAY:for(s=0;s<e.length;s++)sheet(e[s],t,n,r,a,l,o);break;case OBJECT:for(s in e)i=e[s],n&&/^[-\w$]+$/.test(s)?(u||(u=1,t.push(n||"*"," {\n")),declarations(i,t,s,a,l,o)):/^@/.test(s)?(u=u&&t.push("}\n")&&0,at(s,i,t,n,r,a,l,o)):(u=u&&t.push("}\n")&&0,sheet(i,t,(c=/,/.test(n)||n&&/,/.test(s))?cartesian(n.split(","),(l?s.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,o.l):s).split(","),n).join(","):concat(n,l?s.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,o.l):s,n),c?cartesian(r.split(","),s.split(","),r).join(","):concat(r,s,r),a,l,o));u&&t.push("}\n");break;case STRING:t.push(n||":-error-no-selector"," {\n"),declarations(e,t,"",a,l,o),t.push("}\n")}}function j2c(e){function t(e,t){for(t=0;t<n.length;t++)e=n[t](e)||e;return e.join("")}e=e||{};var n=[];return e.use=function(){for(var t=arguments,r=0;r<t.length;r++)n.push(t[r]);return e},e.sheet=function(e,n){1===arguments.length&&(n=e,e={});var r,a=scope_root+counter++,l={},o=[];for(r in e)r-0!=r-0&&own.call(e,r)&&(l[r]=e[r]);sheet(n,o,"","",emptyArray,1,{e:function(e,t){var n=l[t];l[t]=n.slice(0,n.lastIndexOf(" ")+1)+e+" "+n.slice(n.lastIndexOf(" ")+1)},l:function(e,t,n,r,o){return n?t+n:(l[o]||(l[o]=o+a),t+r+l[o].match(/\S+$/))}}),o=new String(t(o));for(r in l)own.call(l,r)&&(o[r]=l[r]);return o},e.inline=function(e,n,r){return 1===arguments.length&&(n=e,e={}),declarations(n,r=[],"",emptyArray,1,{l:function(t,n,r,a,l){return r?n+r:e[l]?n+a+e[l]:l}}),t(r)},e.prefix=function(e,t){return cartesian(t.map(function(e){return"-"+e+"-"}).concat([""]),[e])},e}function kv(e,t,n){return n={},n[e]=t,n}var emptyObject={},emptyArray=[],type=emptyObject.toString,own=emptyObject.hasOwnProperty,OBJECT=type.call(emptyObject),ARRAY=type.call(emptyArray),STRING=type.call(""),findClass=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,scope_root="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",counter=0;j2c.global=function(e){return":global("+e+")"},j2c.kv=kv,j2c.at=function e(t,n,r){if(arguments.length<3){var a=e.bind.apply(e,[null].concat([].slice.call(arguments,0)));return a.toString=function(){return"@"+t+" "+n},a}return kv("@"+t+" "+n,r)},j2c(j2c),delete j2c.use,module.exports=j2c;

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

var j2c=function(){"use strict";function t(t,e,r,l,s,a){l=[];for(a in e)if(f.call(e,a))for(s in t)f.call(t,s)&&l.push(n(t[s],e[a],r));return l}function n(t,n,e){return e&&(/^[-\w$]+$/.test(n)&&":-error-bad-sub-selector-"+n||/&/.test(n)&&n.replace(/&/g,t))||t+n}function e(t){return"-"+t.toLowerCase()}function r(t,n,l,s,a,o,i,u,g){if(null!=t)if(/\$/.test(l))for(g in l=l.split("$"))f.call(l,g)&&r(t,n,l[g],s,a,o);else switch(c.call(t=t.valueOf())){case h:for(i=0;i<t.length;i++)r(t[i],n,l,s,a,o);break;case p:l=l&&l+"-";for(i in t)if(f.call(t,i))if(u=t[i],/\$/.test(i))for(g in i=i.split("$"))f.call(i,g)&&r(u,n,l+i[g],s,a,o);else r(u,n,l+i,s,a,o);break;default:for(i=l.replace(/_/g,"-").replace(/[A-Z]/g,e),!a||"animation-name"!=i&&"animation"!=i||(t=t.split(",").map(function(t){return t.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,o.l)}).join(",")),/^animation|^transition/.test(i)&&(s=["webkit"]),i=i.replace(/^@/,"*"),g=0;g<s.length;g++)n.push("-",s[g],"-",i,i?":":"",t,";\n");n.push(i,i?":":"",t,";\n")}}function l(t,n,e,r,l,a,o,i){var f;if(/^@(?:namespace|import|charset)$/.test(t))if(c.call(n)==h)for(f=0;f<n.length;f++)e.push(t," ",n[f],";\n");else e.push(t," ",n,";\n");else if(/^@keyframes /.test(t))t=o?t.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,i.l):t,e.push("@-webkit-",t.slice(1)," {\n"),s(n,e,"","",["webkit"]),e.push("}\n"),e.push(t," {\n"),s(n,e,"","",a,o,i),e.push("}\n");else if(/^@extends?$/.test(t)){for(;f=w.exec(l);)t=f[4];if(null==t||!o)return void e.push("@-error-cannot-extend-in-global-context ",JSON.stringify(l),";\n");if(/^@extends?$/.test(t))return void e.push("@-error-no-class-to-extend-in ",JSON.stringify(l),";\n");i.e(c.call(n)==h?n.map(function(t){return t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l)}).join(" "):n.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l),t)}else/^@(?:font-face$|viewport$|page )/.test(t)?s(n,e,t,t,u):/^@global$/.test(t)?s(n,e,r,l,a,0,i):/^@local$/.test(t)?s(n,e,r,l,a,1,i):/^@(?:media |supports |document )./.test(t)?(e.push(t," {\n"),s(n,e,r,l,a,o,i),e.push("}\n")):e.push("@-error-unsupported-at-rule ",JSON.stringify(t),";\n")}function s(e,a,o,i,u,f,w){var m,b,d,$;switch(c.call(e)){case h:for(m=0;m<e.length;m++)s(e[m],a,o,i,u,f,w);break;case p:for(m in e)d=e[m],o&&/^[-\w$]+$/.test(m)?($||($=1,a.push(o||"*"," {\n")),r(d,a,m,u,f,w)):/^@/.test(m)?($=$&&a.push("}\n")&&0,l(m,d,a,o,i,u,f,w)):($=$&&a.push("}\n")&&0,s(d,a,(b=/,/.test(o)||o&&/,/.test(m))?t(o.split(","),(f?m.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):m).split(","),o).join(","):n(o,f?m.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):m,o),b?t(i.split(","),m.split(","),i).join(","):n(i,m,i),u,f,w));$&&a.push("}\n");break;case g:a.push(o||":-error-no-selector"," {\n"),r(e,a,"",u,f,w),a.push("}\n")}}function a(n){function e(t,n){for(n=0;n<l.length;n++)t=l[n](t)||t;return t.join("")}n=n||{};var l=[];return n.use=function(){for(var t=arguments,e=0;e<t.length;e++)l.push(t[e]);return n},n.sheet=function(t,n){1===arguments.length&&(n=t,t={});var r,l=m+b++,a={},o=[];for(r in t)r-0!=r-0&&f.call(t,r)&&(a[r]=t[r]);s(n,o,"","",u,1,{e:function(t,n){var e=a[n];a[n]=e.slice(0,e.lastIndexOf(" ")+1)+t+" "+e.slice(e.lastIndexOf(" ")+1)},l:function(t,n,e,r,s){return e?n+e:(a[s]||(a[s]=s+l),n+r+a[s].match(/\S+$/))}}),o=new String(e(o));for(r in a)f.call(a,r)&&(o[r]=a[r]);return o},n.inline=function(t,n,l){return 1===arguments.length&&(n=t,t={}),r(n,l=[],"",u,1,{l:function(n,e,r,l,s){return r?e+r:t[s]?e+l+t[s]:s}}),e(l)},n.prefix=function(n,e){return t(e.map(function(t){return"-"+t+"-"}).concat([""]),[n])},n}function o(t,n,e){return e={},e[t]=n,e}var i={},u=[],c=i.toString,f=i.hasOwnProperty,p=c.call(i),h=c.call(u),g=c.call(""),w=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,m="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",b=0;return a.global=function(t){return":global("+t+")"},a.kv=o,a.at=function d(t,n,e){if(arguments.length<3){var r=d.bind.apply(d,[null].concat([].slice.call(arguments,0)));return r.toString=function(){return"@"+t+" "+n},r}return o("@"+t+" "+n,e)},a(a),delete a.use,a}();
var j2c=function(){"use strict";function t(t,e,r,l,o,s){l=[];for(s in e)if(f.call(e,s))for(o in t)f.call(t,o)&&l.push(n(t[o],e[s],r));return l}function n(t,n,e){return e&&(/^[-\w$]+$/.test(n)&&":-error-bad-sub-selector-"+n||/&/.test(n)&&n.replace(/&/g,t))||t+n}function e(t){return"-"+t.toLowerCase()}function r(t,n,l,o,s,a,i,u,g){if(null!=t)if(/\$/.test(l))for(g in l=l.split("$"))f.call(l,g)&&r(t,n,l[g],o,s,a);else switch(c.call(t=t.valueOf())){case h:for(i=0;i<t.length;i++)r(t[i],n,l,o,s,a);break;case p:l=l&&l+"-";for(i in t)if(f.call(t,i))if(u=t[i],/\$/.test(i))for(g in i=i.split("$"))f.call(i,g)&&r(u,n,l+i[g],o,s,a);else r(u,n,l+i,o,s,a);break;default:for(i=l.replace(/_/g,"-").replace(/[A-Z]/g,e),!s||"animation-name"!=i&&"animation"!=i||(t=t.split(",").map(function(t){return t.replace(/()(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,a.l)}).join(",")),/^animation|^transition/.test(i)&&(o=["webkit"]),i=i.replace(/^@/,"*"),g=0;g<o.length;g++)n.push("-",o[g],"-",i,i?":":"",t,";\n");n.push(i,i?":":"",t,";\n")}}function l(t,n,e,r,l,s,a,i){var f;if(/^@(?:namespace|import|charset)$/.test(t))if(c.call(n)==h)for(f=0;f<n.length;f++)e.push(t," ",n[f],";\n");else e.push(t," ",n,";\n");else if(/^@keyframes /.test(t))t=a?t.replace(/( )(?::global\(\s*([-\w]+)\s*\)|()([-\w]+))/,i.l):t,e.push("@-webkit-",t.slice(1)," {\n"),o(n,e,"","",["webkit"]),e.push("}\n"),e.push(t," {\n"),o(n,e,"","",s,a,i),e.push("}\n");else if(/^@extends?$/.test(t)){for(;f=w.exec(l);)t=f[4];if(null==t||!a)return void e.push("@-error-cannot-extend-in-global-context ",JSON.stringify(l),";\n");if(/^@extends?$/.test(t))return void e.push("@-error-no-class-to-extend-in ",JSON.stringify(l),";\n");i.e(c.call(n)==h?n.map(function(t){return t.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l)}).join(" "):n.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|()\.([-\w]+))/,i.l),t)}else/^@(?:font-face$|viewport$|page )/.test(t)?o(n,e,t,t,u):/^@global$/.test(t)?o(n,e,r,l,s,0,i):/^@local$/.test(t)?o(n,e,r,l,s,1,i):/^@(?:media |supports |document )./.test(t)?(e.push(t," {\n"),o(n,e,r,l,s,a,i),e.push("}\n")):e.push("@-error-unsupported-at-rule ",JSON.stringify(t),";\n")}function o(e,s,a,i,u,f,w){var b,d,m,$;switch(c.call(e)){case h:for(b=0;b<e.length;b++)o(e[b],s,a,i,u,f,w);break;case p:for(b in e)m=e[b],a&&/^[-\w$]+$/.test(b)?($||($=1,s.push(a||"*"," {\n")),r(m,s,b,u,f,w)):/^@/.test(b)?($=$&&s.push("}\n")&&0,l(b,m,s,a,i,u,f,w)):($=$&&s.push("}\n")&&0,o(m,s,(d=/,/.test(a)||a&&/,/.test(b))?t(a.split(","),(f?b.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):b).split(","),a).join(","):n(a,f?b.replace(/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,w.l):b,a),d?t(i.split(","),b.split(","),i).join(","):n(i,b,i),u,f,w));$&&s.push("}\n");break;case g:s.push(a||":-error-no-selector"," {\n"),r(e,s,"",u,f,w),s.push("}\n")}}function s(n){function e(t,n){for(n=0;n<l.length;n++)t=l[n](t)||t;return t.join("")}n=n||{};var l=[];return n.use=function(){for(var t=arguments,e=0;e<t.length;e++)l.push(t[e]);return n},n.sheet=function(t,n){1===arguments.length&&(n=t,t={});var r,l=b+d++,s={},a=[];for(r in t)r-0!=r-0&&f.call(t,r)&&(s[r]=t[r]);o(n,a,"","",u,1,{e:function(t,n){var e=s[n];s[n]=e.slice(0,e.lastIndexOf(" ")+1)+t+" "+e.slice(e.lastIndexOf(" ")+1)},l:function(t,n,e,r,o){return e?n+e:(s[o]||(s[o]=o+l),n+r+s[o].match(/\S+$/))}}),a=new String(e(a));for(r in s)f.call(s,r)&&(a[r]=s[r]);return a},n.inline=function(t,n,l){return 1===arguments.length&&(n=t,t={}),r(n,l=[],"",u,1,{l:function(n,e,r,l,o){return r?e+r:t[o]?e+l+t[o]:o}}),e(l)},n.prefix=function(n,e){return t(e.map(function(t){return"-"+t+"-"}).concat([""]),[n])},n}function a(t,n,e){return e={},e[t]=n,e}var i={},u=[],c=i.toString,f=i.hasOwnProperty,p=c.call(i),h=c.call(u),g=c.call(""),w=/()(?::global\(\s*(\.[-\w]+)\s*\)|(\.)([-\w]+))/g,b="_j2c_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_"+Math.floor(4294967296*Math.random()).toString(36)+"_",d=0;return s.global=function(t){return":global("+t+")"},s.kv=a,s.at=function t(n,e,r){if(arguments.length<3){var l=t.bind.apply(t,[null].concat([].slice.call(arguments,0)));return l.toString=function(){return"@"+n+" "+e},l}return a("@"+n+" "+e,r)},s(s),delete s.use,s}();
{
"name": "j2c",
"version": "0.11.2",
"version": "0.11.3",
"description": "A tiny CSS in JS solution.",

@@ -5,0 +5,0 @@ "main": "dist/j2c.commonjs.js",

@@ -8,2 +8,3 @@ # j2c [![npm][npm_img]][npm_url] ![.min.gz][size_img]

[![bitHound Score][bithound_img]][bithound_url]
[![downloads][monthly_img]][monthly_url]

@@ -39,2 +40,4 @@

[npm_url]: https://npmjs.com/package/j2c
[monthly_url]: http://npm-stat.com/charts.html?package=j2c
[monthly_img]: https://img.shields.io/npm/dm/j2c.svg
[size_img]: https://badges.herokuapp.com/size/npm/j2c/dist/j2c.global.min.js.gz?label=.min.gz

@@ -52,3 +55,3 @@ [deps_img]: https://david-dm.org/j2css/j2c.svg

- [Usage](#usage)
- [For inline decalrations: `j2c.inline(declarations)`](#for-inline-decalrations-j2cinlinedeclarations)
- [For inline declarations: `j2c.inline(declarations)`](#for-inline-declarations-j2cinlinedeclarations)
- [Arrays](#arrays)

@@ -139,3 +142,3 @@ - [Overloading properties](#overloading-properties)

### For inline decalrations: `j2c.inline(declarations)`
### For inline declarations: `j2c.inline(declarations)`

@@ -168,3 +171,3 @@ The `j2c` function takes in JS objects and builds a `property:value;` list out of it.

Combine (sub)properties who share the same value using `$` as a separator. It is useful to specify vendor prefixes.
Combine (sub)properties who share the same value by using `$` as a separator. It is useful to specify vendor prefixes.

@@ -337,3 +340,3 @@ #### Property ordering

".block,.blockgroup":{
",:before,:after":{ // Notice the initial coma.
",:before,:after":{ // Notice the initial comma.
box_sizing:"border-box"

@@ -610,6 +613,5 @@ }

return m("style", {
sheet: args.sheet
config: function(el, isinit, vdom) {
config: function(el, isinit) {
if(!isinit) {
stylize(el, vdom.attrs.sheet);
stylize(el, args.sheet);
}

@@ -616,0 +618,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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