Comparing version 0.0.6 to 0.0.8
@@ -63,3 +63,17 @@ function Deal(str) { | ||
return deal(str).update(ch - 1, statement, '/*' + statement + '*/'); | ||
}, | ||
"Use the isNaN function to compare with NaN.": function (str, ch) { | ||
var matchs = str.match(/(\w*)\s?={2,3}\s?NaN|NaN\s?={2,3}\s?(\w*)/), | ||
varialbe = '', | ||
newStr = str; | ||
if (matchs[0]) { | ||
varialbe = matchs[1] || matchs[2]; | ||
if (varialbe !== 'NaN') { | ||
newStr = str.replace(matchs[0], 'isNaN(' + varialbe + ')'); | ||
} | ||
} | ||
return newStr; | ||
} | ||
}; |
@@ -6,4 +6,11 @@ #!/usr/bin/env node | ||
map = require('./map.js'), | ||
config = require('./jshint-config.js'), | ||
config, | ||
JSHINT; | ||
try { | ||
config = require('\\\\u\\f2ehint\\lib\\jshint-config.js'); | ||
JSHINT = require('\\\\u\\f2ehint\\packages\\jshint\\jshint.js').JSHINT; | ||
} catch(e) { | ||
config = require('./jshint-config.js'); | ||
JSHINT = require('./jshint.js').JSHINT; | ||
} | ||
@@ -10,0 +17,0 @@ var counts_all = 0, |
@@ -8,3 +8,3 @@ { | ||
"description": "javascript fix base on jshint", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"main": "./lib/run.js", | ||
@@ -23,3 +23,12 @@ "bin": { | ||
"email": "wiky@f2e.cc" | ||
} | ||
}, | ||
"_id": "jsfix@0.0.8", | ||
"_engineSupported": true, | ||
"_npmVersion": "1.1.21", | ||
"_nodeVersion": "v0.6.17", | ||
"_defaultsLoaded": true, | ||
"dist": { | ||
"shasum": "06cd2b6849435b4f8c26088e9b3f576d01b3c2b7" | ||
}, | ||
"_from": "jsfix" | ||
} |
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
176301
4429
15
2
1