New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lvchengbin/is

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lvchengbin/is - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@lvchengbin/is",
"version": "1.0.2",
"version": "1.0.3",
"description": "Do checking...",

@@ -5,0 +5,0 @@ "keywords": [

@@ -24,2 +24,6 @@ # Is

```js
yarn add @lvchengbin/is
```
## Usage

@@ -30,18 +34,7 @@

```js
import isFunction from '@lvchengbin/is/src/function';
import array from '@lvchengbin/is/src/array';
const is = require( '@lvchengbin/is' );
isFunction( async () => {} );
isArray( [] );
```
If you want to invoke the whole package:
```js
import is from '@lvchengbin/is';
is.function( () => {} );
is.function( async () => {} );
is.array( [] );
```
## Using in browsers

@@ -92,59 +85,1 @@

| is.window | import isWindow from '@lvchengbin/is/src/window' |
### is.between
For checking if a number/letter is in an interval
```js
import isBetween from '@lvchengbin/is/src/between';
isBetween( 0, -1, 1 ); // return true
```
### is.date
For checking if an object is a `Date` instance.
```js
import isDate from '@lvchengbin/is/src/date';
isDate( new Date ); // return true
```
### is.empty
an empty value could be am empty object(`{}`), an empty string, an empty array(`[]`), a number `0` or a `false` |
For checking if a value is empty, and empty values include empty object ({}), empty string (''), empty array ([]), number 0, false.
```js
import isEmpty from '@lvchengbin/is/src/empty';
isEmpty( '' ); // return true
isEmpty( [] ); // return true
isEmpty( {} ); // return true
isEmpty( 0 ); // return true
isEmpty( false ); // return true
```
### is.false
For checking if a value is `false`, if the second argument is `true` (by default), the function will check a generalized `false`, it means that the following strings all mean `false`: "false", "no", "0", "", "nay", "n", "disagree".
```js
import isFalse from '@lvchengbin/is/src/false';
isFalse( false ); // returns true
isFalse( 'false' ); // returns true
isFalse( 'false', false ); // returns false
```
### is.true
For checking if a value is `true`, if the second argument is `true` (by default), the function will check a generalized `true`, it means that the following strings all mean `true`: "true", "true", "yes", "ok", "1", "yea", "yep", "y", "agree".
```js
import isTrue from '@lvchengbin/is/src/true';
isTrue( true ); // returns true
isTrue( 'true' ); // returns true
isTrue( 'true', false ); // returns false
```
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