Socket
Socket
Sign inDemoInstall

is-what

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-what - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

test/index.js

13

package.json
{
"name": "is-what",
"version": "2.0.0",
"version": "2.0.1",
"description": "Very simple & small JS type check function",

@@ -8,8 +8,8 @@ "main": "dist/index.cjs.min.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c ./build/rollup.js"
"test": "ava",
"build": "rollup -c ./build/rollup.js && npm run test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mesqueeb/isWhat.git"
"url": "git+https://github.com/mesqueeb/is-what.git"
},

@@ -24,8 +24,9 @@ "keywords": [

"bugs": {
"url": "https://github.com/mesqueeb/isWhat/issues"
"url": "https://github.com/mesqueeb/is-what/issues"
},
"homepage": "https://github.com/mesqueeb/isWhat#readme",
"homepage": "https://github.com/mesqueeb/is-what#readme",
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"ava": "1.0.0-beta.8",
"rollup": "^0.65.2",

@@ -32,0 +33,0 @@ "rollup-plugin-babel": "^4.0.3",

@@ -1,5 +0,13 @@

# isWhat
# is What?
```
npm i is-what
```
Very simple & small JS type check function
**Motivation:** I built is-what because the existing solutions were all too complex.
It's litterally just these functions:
```js

@@ -41,8 +49,8 @@ function getType (payload) {

Since v2.0.0 it will return false on `isNumber()` and `isDate()` if the payload is `NaN` or an invalid date.
Since v2.0.0, checking for `isNumber` and `isDate` will return `false` if the payload is `NaN` or an invalid date.
## Build from source
## Tests
```bash
npm run build
```
npm run test
```

@@ -33,3 +33,3 @@

function isDate (payload) {
return (getType(payload) === 'Date' && !isNaN(payload))
return (getType(payload) === 'Date' && !isNaN(payload))
}

@@ -36,0 +36,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc