Comparing version 2.0.0 to 2.0.1
{ | ||
"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
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
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
18200
14
218
0
56
0
8