Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via pnpm
Package summary
Share
0
issues
1
license
1
MIT
Package created
26 Sep 2014
Version published
16 Jan 2020
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
kind-of@6.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of kind-of 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does kind-of do?

"Kind-of" is a high-performing npm package meticulously developed to get the fundamental type of any value in JavaScript. This versatile package can effectively distinguish between nuanced data types like 'null', 'undefined', 'boolean', 'buffer', 'number', 'string', 'arguments', 'object', 'array', 'regexp', 'date', 'error', 'function', ' generatorfunction', etc. It achieves the task more consistently and efficiently than other comparable libraries.

How do you use kind-of?

To use "kind-of", start by installing it via npm or bower with the following commands:

$ npm install --save kind-of

or

$ bower install kind-of --save

Once installed, you require it at the top of your file and use the exported function to get the type of any value.

var kindOf = require('kind-of');

console.log(kindOf(undefined)); // 'undefined'
console.log(kindOf(null)); // 'null'
console.log(kindOf(true)); // 'boolean'
console.log(kindOf(new Buffer(''))); // 'buffer'
console.log(kindOf(42)); // 'number'
console.log(kindOf('str')); // 'string'
console.log(kindOf(arguments)); // 'arguments'
console.log(kindOf({})); // 'object'
console.log(kindOf(new Date())); // 'date'
console.log(kindOf(/foo/)); // 'regexp'
console.log(kindOf(new Error('error'))); // 'error'
console.log(kindOf(function () {})); // 'function'
console.log(kindOf(Symbol('str'))); // 'symbol'
// and so on for other types...

Turns out the kind-of package is very easy to use, providing an efficient way to acquire the native type of values.

Where are the kind-of docs?

The official documentation for the "kind-of" package can be found on its GitHub repository: https://github.com/jonschlinkert/kind-of. This includes usage, installation details, benchmarks, optimizations and more. Remember, the key to mastering the usage of the "kind-of" package is hands-on coding and understanding the fundamental JavaScript types.