Comparing version 0.2.0-1 to 0.2.0-2
@@ -13,3 +13,2 @@ var homunculus=function(){var _0=require('homunculus');return _0.hasOwnProperty("default")?_0["default"]:_0}(); | ||
}); | ||
//depth(res); | ||
return res; | ||
@@ -174,36 +173,2 @@ } | ||
function depth(res) { | ||
var keys = Object.keys(res); | ||
//_:伪类 | ||
if(res.hasOwnProperty('_:')) { | ||
res['_:'].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//_[属性 | ||
if(res.hasOwnProperty('_[')) { | ||
res['_['].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//普通样式深度 | ||
keys = keys.filter(function(k) { | ||
return k.charAt(0) != '_'; | ||
}); | ||
if(keys.length) { | ||
var i = 0; | ||
keys.forEach(function(k) { | ||
var item = res[k]; | ||
i = Math.max(depth(item), i); | ||
}); | ||
if(i) { | ||
res._d = i; | ||
} | ||
return i + 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
} | ||
function isSplit(token) { | ||
@@ -210,0 +175,0 @@ if(token.type() == Token.BLANK) { |
{ | ||
"name": "jaw", | ||
"version": "0.2.0-1", | ||
"version": "0.2.0-2", | ||
"description": "Parasitize CSS to JSX for migi", | ||
@@ -39,3 +39,3 @@ "maintainers": [ | ||
"expect.js": "^0.3.1", | ||
"gulp": "^3.8.11", | ||
"gulp": "^3.9.0", | ||
"gulp-clean": "^0.3.1", | ||
@@ -42,0 +42,0 @@ "gulp-util": "^3.0.1", |
@@ -13,3 +13,2 @@ import homunculus from 'homunculus'; | ||
}); | ||
//depth(res); | ||
return res; | ||
@@ -174,36 +173,2 @@ } | ||
function depth(res) { | ||
var keys = Object.keys(res); | ||
//_:伪类 | ||
if(res.hasOwnProperty('_:')) { | ||
res['_:'].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//_[属性 | ||
if(res.hasOwnProperty('_[')) { | ||
res['_['].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//普通样式深度 | ||
keys = keys.filter(function(k) { | ||
return k.charAt(0) != '_'; | ||
}); | ||
if(keys.length) { | ||
var i = 0; | ||
keys.forEach(function(k) { | ||
var item = res[k]; | ||
i = Math.max(depth(item), i); | ||
}); | ||
if(i) { | ||
res._d = i; | ||
} | ||
return i + 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
} | ||
function isSplit(token) { | ||
@@ -210,0 +175,0 @@ if(token.type() == Token.BLANK) { |
@@ -13,3 +13,2 @@ define(function(require, exports, module){var homunculus=function(){var _0=require('homunculus');return _0.hasOwnProperty("default")?_0["default"]:_0}(); | ||
}); | ||
//depth(res); | ||
return res; | ||
@@ -174,36 +173,2 @@ } | ||
function depth(res) { | ||
var keys = Object.keys(res); | ||
//_:伪类 | ||
if(res.hasOwnProperty('_:')) { | ||
res['_:'].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//_[属性 | ||
if(res.hasOwnProperty('_[')) { | ||
res['_['].forEach(function(item) { | ||
depth(item[1]); | ||
}); | ||
} | ||
//普通样式深度 | ||
keys = keys.filter(function(k) { | ||
return k.charAt(0) != '_'; | ||
}); | ||
if(keys.length) { | ||
var i = 0; | ||
keys.forEach(function(k) { | ||
var item = res[k]; | ||
i = Math.max(depth(item), i); | ||
}); | ||
if(i) { | ||
res._d = i; | ||
} | ||
return i + 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
} | ||
function isSplit(token) { | ||
@@ -210,0 +175,0 @@ if(token.type() == Token.BLANK) { |
Sorry, the diff of this file is not supported yet
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
129813
1137