
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@lvchengbin/is
Advanced tools
A library, which is possible to be imported as ES6 module separately, for checking the type of a value.
A JavaScript library for checking the type of a value for browsers.
npm i @lvchengbin/is --save
Generally, when we are using some toolkit such as rollup, we don't want to compile a huge library into our project, therefore, to import the files you really need.
import isFunction from '@lvchengbin/is/src/function';
import array from '@lvchengbin/is/src/array';
isFunction( async () => {} );
isArray( [] );
If you want to invoke the whole package:
import is from '@lvchengbin/is';
is.function( () => {} );
is.array( [] );
If you want to invoke this package to browsers with <script>
tag or something like that, use is.js. For old browsers which are not supporting ES5 syntax, use is.bc.js.
import isArguments from '@lvchengbin/is/src/arguments';
import isArray from '@lvchengbin/is/src/array';
For checking if a function is an arrow function
.
import isArrowFunction from '@lvchengbin/is/src/arrow-function';
isArrowFunction( () => {} ); // returns true
For checking if a function
is an async function
.
import isAsyncFunction from '@lvchengbin/is/src/async-function';
isAsyncFunction( async () => {} ); // returns true
import isBoolean from '@lvchengbin/is/src/boolean';
For checking if an object is a Date
instance.
import isDate from '@lvchengbin/is/src/date';
isDate( new Date ); // return true
For checking if the value is an email address.
import isEmail from '@lvchengbin/is/src/email';
isEmail( 'abc@gmail.com' ); // returns true
For checking if a value is empty, and empty values include empty object ({}), empty string (''), empty array ([]), number 0, false.
import isEmpty from '@lvchengbin/is/src/empty';
isEmpty( '' ); // return true
isEmpty( [] ); // return true
isEmpty( {} ); // return true
isEmpty( 0 ); // return true
isEmpty( false ); // return true
For checking if an object is an Error
instance.
import isError from '@lvchengbin/is/src/error';
isError( new Error ); // returns true
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".
import isFalse from '@lvchengbin/is/src/false';
isFalse( false ); // returns true
isFalse( 'false' ); // returns true
isFalse( 'false', false ); // returns false
import isFunction from '@lvchengbin/is/src/function';
import isInteger from '@lvchengbin/is/src/integer';
import isIterable from '@lvchengbin/is/src/iterable';
import isNumber from '@lvchengbin/is/src/number';
import isObject from '@lvchengbin/is/src/object';
import isPlainObject from '@lvchengbin/is/src/plain-object';
import isPromise from '@lvchengbin/is/src/promise';
import isRegExp from '@lvchengbin/is/src/regexp';
import isString from '@lvchengbin/is/src/string';
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".
import isTrue from '@lvchengbin/is/src/true';
isTrue( true ); // returns true
isTrue( 'true' ); // returns true
isTrue( 'true', false ); // returns false
import isUndefined from '@lvchengbin/is/src/undefined';
import isUrl from '@lvchengbin/is/src/url';
impor isNode from '@lvchengbin/is/src/node';
impor isTextNode from '@lvchengbin/is/src/text-node';
impor isElementNode from '@lvchengbin/is/src/element-node';
import isWindow from '@lvchengbin/is/src/window';
FAQs
Do checking...
The npm package @lvchengbin/is receives a total of 864 weekly downloads. As such, @lvchengbin/is popularity was classified as not popular.
We found that @lvchengbin/is demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.