Socket
Socket
Sign inDemoInstall

is-type-of

Package Overview
Dependencies
2
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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;
}

9

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc