Comparing version 1.0.10 to 1.0.11
@@ -51,3 +51,3 @@ 'use strict'; | ||
_.isExistedFile = function(p){ | ||
_.isExistedFile = function(p) { | ||
p = p.replace(/(\?|#).*$/, ''); | ||
@@ -57,6 +57,11 @@ return fs.existsSync(p) && fs.statSync(p).isFile(); | ||
_.isExistedDir = function(p){ | ||
_.isExistedDir = function(p) { | ||
return fs.existsSync(p) && fs.statSync(p).isDirectory(); | ||
}; | ||
_.noCacheRequire = function(resolvedPath) { | ||
delete require.cache[resolvedPath]; | ||
return require(resolvedPath); | ||
}; | ||
_.ipv4 = ipv4; | ||
@@ -63,0 +68,0 @@ _.semver = semver; |
{ | ||
"name": "xutil", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "xutil", | ||
@@ -27,3 +27,2 @@ "keywords": [ | ||
"devDependencies": { | ||
"co-mocha": "^1.1.3", | ||
"istanbul": "*", | ||
@@ -36,10 +35,10 @@ "jshint": "*", | ||
"scripts": { | ||
"test": "make test", | ||
"jshint": "make jshint" | ||
"test": "istanbul cover `npm bin`/_mocha", | ||
"lint": "jshint .", | ||
"ci": "npm run test" | ||
}, | ||
"pre-commit": [ | ||
"jshint" | ||
"lint" | ||
], | ||
"homepage": "https://github.com/xudafeng/xutil", | ||
"license": "MIT" | ||
} |
@@ -15,3 +15,3 @@ # xutil | ||
[coveralls-url]: https://coveralls.io/r/xudafeng/xutil?branch=master | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
@@ -18,0 +18,0 @@ [download-image]: https://img.shields.io/npm/dm/xutil.svg?style=flat-square |
'use strict'; | ||
var _ = require('..'); | ||
const _ = require('..'); | ||
const assert = require('assert'); | ||
describe('test', function() { | ||
it('base', function() { | ||
_.ipv4.should.be.ok(); | ||
_.uuid().should.be.ok(); | ||
assert.ok(_.ipv4); | ||
assert.ok(_.uuid()); | ||
}); | ||
}); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
4806
5
73
1
2