is-type-of
Advanced tools
Comparing version 0.1.0 to 0.2.0
31
index.js
@@ -14,2 +14,3 @@ /*! | ||
var utils = require('core-util-is'); | ||
var isStearm = require('isstream'); | ||
@@ -20,8 +21,19 @@ /** | ||
Object.keys(utils).forEach(function(m) { | ||
var name = m.slice(2); | ||
name = name[0].toLowerCase() + name.slice(1); | ||
exports[name] = utils[m]; | ||
Object.keys(utils).map(function (name) { | ||
exports[transform(name)] = utils[name]; | ||
}); | ||
/** | ||
* Stream detected by isstream | ||
*/ | ||
exports.stream = isStearm; | ||
exports.readableStream = isStearm.isReadable; | ||
exports.writableStream = isStearm.isWritable; | ||
exports.duplexStream = isStearm.isDuplex; | ||
/** | ||
* Extend method | ||
*/ | ||
exports.NaN = function (obj) { | ||
@@ -61,1 +73,12 @@ return Number.isNaN(obj); | ||
/** | ||
* transform isNull type to null | ||
* @param {[type]} m [description] | ||
* @return {[type]} [description] | ||
*/ | ||
function transform(m) { | ||
var name = m.slice(2); | ||
name = name[0].toLowerCase() + name.slice(1); | ||
return name; | ||
} |
{ | ||
"name": "is-type-of", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "complete type checking for node", | ||
@@ -29,8 +29,9 @@ "main": "index.js", | ||
"istanbul": "git://github.com/gotwarlost/istanbul.git#harmony", | ||
"should": "^3.1.3", | ||
"mocha": "^1.17.1" | ||
"mocha": "^1.17.1", | ||
"should": "3.2.0" | ||
}, | ||
"dependencies": { | ||
"core-util-is": "1.0.1" | ||
"core-util-is": "1.0.1", | ||
"isstream": "0.1.0" | ||
} | ||
} |
@@ -6,2 +6,7 @@ is-type-of | ||
dependencies: | ||
- [core-util-is](https://github.com/isaacs/core-util-is) | ||
- [is-stream](https://github.com/rvagg/isstream) | ||
## Install | ||
@@ -60,2 +65,12 @@ | ||
### from [is-stream](https://github.com/rvagg/isstream) | ||
#### is.stream(stream) | ||
#### is.readableStream(readable) | ||
#### is.writableStream(writable) | ||
#### is.duplexStream(duplex) | ||
### Extend API | ||
@@ -62,0 +77,0 @@ |
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
3787
62
95
2
+ Addedisstream@0.1.0
+ Addedisstream@0.1.0(transitive)