Comparing version
{ | ||
"name": "kindjs", | ||
"version": "2.0.0", | ||
"description": "Precise type-checker for JavaScript", | ||
"version": "1.0.4", | ||
"main": "kind", | ||
"author": "Craig Patik <craig@patik.com> (http://patik.com)", | ||
"devDependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-jshint": "^0.11.0", | ||
"grunt-contrib-qunit": "^0.5.2", | ||
"grunt-contrib-uglify": "^0.8.0", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-markdown": "^0.7.0", | ||
"load-grunt-tasks": "^3.1.0" | ||
"main": "./dist/src/index.js", | ||
"types": "./dist/src/index.d.ts", | ||
"files": [ | ||
"dist/**/*" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"clean": "rm -rf ./dist/", | ||
"coverage": "codecov", | ||
"lint": "eslint ./src/ --fix", | ||
"prepare": "husky install", | ||
"semantic-release": "semantic-release", | ||
"test:watch": "jest --watch", | ||
"test": "jest --coverage", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/patik/kind.git" | ||
}, | ||
"license": "ISC", | ||
"author": { | ||
"name": "Craig Patik", | ||
"email": "craig@patik.com", | ||
"url": "https://github.com/patik" | ||
}, | ||
"engines": { | ||
"node": ">=14.0" | ||
}, | ||
"keywords": [ | ||
"typeof", | ||
"JavaScript", | ||
"javascript", | ||
"type", | ||
"type checking", | ||
"object" | ||
"object", | ||
"typescript" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/patik/kind.git" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/patik/kind/issues" | ||
}, | ||
"homepage": "https://github.com/patik/kind", | ||
"directories": { | ||
"test": "test" | ||
"homepage": "https://github.com/patik/kind#readme", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/jest": "^27.5.0", | ||
"@types/node": "^17.0.31", | ||
"@typescript-eslint/eslint-plugin": "^5.22.0", | ||
"@typescript-eslint/parser": "^5.22.0", | ||
"codecov": "^3.8.1", | ||
"eslint": "^8.15.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"husky": "^7.0.4", | ||
"jest": "^28.1.0", | ||
"jest-environment-jsdom": "^28.1.0", | ||
"lint-staged": "^12.4.1", | ||
"prettier": "^2.2.1", | ||
"semantic-release": "^19.0.2", | ||
"ts-jest": "^28.0.1", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.2.4" | ||
}, | ||
"dependencies": { | ||
"grunt": "^0.4.5" | ||
"lint-staged": { | ||
"*.ts": "eslint --cache --cache-location .eslintcache --fix" | ||
}, | ||
"scripts": { | ||
"test": "test/unit/kind.js" | ||
"release": { | ||
"branches": [ | ||
"main" | ||
] | ||
} | ||
} |
@@ -5,2 +5,12 @@ # Kind | ||
[![npm package][npm-img]][npm-url] | ||
[![Build Status][build-img]][build-url] | ||
[![Downloads][downloads-img]][downloads-url] | ||
[![Issues][issues-img]][issues-url] | ||
[![Code Coverage][codecov-img]][codecov-url] | ||
[![Semantic Release][semantic-release-img]][semantic-release-url] | ||
## Description | ||
`kind()` returns a *useful* name for a variable's type. It breaks down objects into more precise terms: array, null, element, etc. | ||
@@ -20,13 +30,17 @@ | ||
## Installation | ||
## Install | ||
**yarn**: `yarn add kindjs` | ||
**npm**: `npm install kindjs` | ||
**Bower**: `bower install kind` | ||
## Usage | ||
Or just download [kind.js](https://github.com/patik/kind/blob/master/kind.js) and reference it in your page with a `<script>` tag. | ||
## Usage | ||
```ts | ||
import kind from 'kindjs'; | ||
Available as a CommonJS module (e.g with RequireJS) or as a global method, `kind()`. | ||
kind(['hello', 'world']); | ||
//=> 'array' | ||
``` | ||
@@ -100,3 +114,3 @@ ### Basic | ||
- Optimized to check for the most common types first | ||
- Excellent browser support | ||
- Excellent browser support, including many very old browsers | ||
+ IE 6+ (and maybe older) | ||
@@ -107,4 +121,18 @@ + Chrome | ||
+ Android 1+ | ||
+ Opera | ||
+ Opera (pre-Blink) | ||
+ Netscape 4 (in theory!) | ||
+ Probably anything that runs JavaScript and supports regular expressions | ||
[build-img]: https://github.com/patik/kind/actions/workflows/release.yml/badge.svg | ||
[build-url]: https://github.com/patik/kind/actions/workflows/release.yml | ||
[downloads-img]: https://img.shields.io/npm/dt/kindjs | ||
[downloads-url]: https://www.npmtrends.com/kindjs | ||
[npm-img]: https://img.shields.io/npm/v/kindjs | ||
[npm-url]: https://www.npmjs.com/package/kindjs | ||
[issues-img]: https://img.shields.io/github/issues/patik/kind | ||
[issues-url]: https://github.com/patik/kind/issues | ||
[codecov-img]: https://codecov.io/gh/patik/kind/branch/main/graph/badge.svg | ||
[codecov-url]: https://codecov.io/gh/patik/kind | ||
[semantic-release-img]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg | ||
[semantic-release-url]: https://github.com/semantic-release/semantic-release | ||
Sorry, the diff of this file is not supported yet
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
19397
36.97%0
-100%343
69.8%135
26.17%18
157.14%1
Infinity%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed