stylecow-core
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -84,3 +84,3 @@ (function (stylecow) { | ||
stylecow.loadNpmModule = function (name) { | ||
require(name)(stylecow); | ||
stylecow.use(require(name)); | ||
@@ -90,2 +90,9 @@ return stylecow; | ||
//Use a loaded npm module | ||
stylecow.use = function (module) { | ||
module(stylecow); | ||
return stylecow; | ||
}; | ||
//Parse a css string | ||
@@ -92,0 +99,0 @@ stylecow.parse = function (code, className, constructor, filename) { |
@@ -586,2 +586,6 @@ (function (stylecow) { | ||
if (needle === false) { | ||
return value ? false : true; | ||
} | ||
if (typeof needle === 'string') { | ||
@@ -588,0 +592,0 @@ return (needle === value); |
@@ -134,12 +134,4 @@ (function (stylecow) { | ||
//execute the children tasks recursively | ||
var k = 0; | ||
while (element[k] !== undefined) { | ||
if (element[k].data.executed) { | ||
++k; | ||
continue; | ||
} | ||
executeChildTasks(element[k], tasks); | ||
k = 0; | ||
if (element.length) { | ||
execChildrenTasks(element, tasks) | ||
} | ||
@@ -193,13 +185,3 @@ | ||
if (element.length) { | ||
var k = 0; | ||
while (element[k] !== undefined) { | ||
if (element[k].data.executed) { | ||
++k; | ||
continue; | ||
} | ||
executeChildTasks(element[k], tasks); | ||
k = 0; | ||
} | ||
execChildrenTasks(element, tasks) | ||
} | ||
@@ -237,1 +219,15 @@ | ||
} | ||
function execChildrenTasks (element, tasks) { | ||
var k = 0; | ||
while (element[k] !== undefined) { | ||
if (element[k].data.executed) { | ||
++k; | ||
continue; | ||
} | ||
executeChildTasks(element[k], tasks); | ||
k = 0; | ||
} | ||
} |
@@ -142,3 +142,3 @@ var t = function (code) { | ||
SPECIAL_CHAR: function () { | ||
if (this.currChar in specialChars) { | ||
if (specialChars.hasOwnProperty(this.currChar)) { | ||
return [specialChars[this.currChar], this.line, this.col]; | ||
@@ -145,0 +145,0 @@ } |
{ | ||
"name": "stylecow-core", | ||
"description": "Stylecow core library", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": "Oscar Otero <oom@oscarotero.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-core", |
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
56009519
290773