Gathering detailed insights and metrics for @marionebl/is
Gathering detailed insights and metrics for @marionebl/is
Gathering detailed insights and metrics for @marionebl/is
Gathering detailed insights and metrics for @marionebl/is
npm install @marionebl/is
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,720 Stars
237 Commits
117 Forks
19 Watchers
1 Branches
50 Contributors
Updated on Jul 11, 2025
Latest Version
0.5.1-0
Package Id
@marionebl/is@0.5.1-0
Size
6.85 kB
NPM Version
5.5.1
Node Version
8.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
8
Type check values:
is.string('🦄') //=> true
$ npm install @sindresorhus/is
1const is = require('@sindresorhus/is'); 2 3is('🦄'); 4//=> 'string' 5 6is(new Map()); 7//=> 'Map' 8 9is.number(6); 10//=> true
Returns the type of value
.
Primitives are lowercase and object types are camelcase.
Example:
'undefined'
'null'
'string'
'symbol'
'Array'
'Function'
'Object'
Note: It will throw if you try to feed it object-wrapped primitives, as that's a bad practice. For example new String('foo')
.
All the below methods accept a value and returns a boolean for whether the value is of the desired type.
Keep in mind that functions are objects too.
Returns true
for any object with a .then()
and .catch()
method. Prefer this one over .nativePromise()
as you usually want to allow userland promise implementations too.
Returns true
for any object that implements its own .next()
and .throw()
methods and has a function definition for Symbol.iterator
.
Returns true
for any async
function that can be called with the await
operator.
1is.asyncFunction(async () => {}); 2// => true 3 4is.asyncFunction(() => {}); 5// => false
Returns true
for all values that evaluate to true in a boolean context:
1is.truthy('🦄'); 2//=> true 3 4is.truthy(undefined); 5//=> false
Returns true
if value
is one of: false
, 0
, ''
, null
, undefined
, NaN
.
JavaScript primitives are as follows: null
, undefined
, string
, number
, boolean
, symbol
.
Returns true
if value
is a safe integer.
An object is plain if it's created by either {}
, new Object()
, or Object.create(null)
.
Returns true
for instances created by a ES2015 class.
A value
is array-like if it is not a function and has a value.length
that is a safe integer greater than or equal to 0.
1is.arrayLike(document.forms);
2//=> true
3
4function () {
5 is.arrayLike(arguments);
6 //=> true
7}
Check if value
(number) is in the given range
. The range is an array of two values, lower bound and upper bound, in no specific order.
1is.inRange(3, [0, 5]); 2is.inRange(3, [5, 0]); 3is.inRange(0, [-2, 2]);
Check if value
(number) is in the range of 0
to upperBound
.
1is.inRange(3, 10);
Returns true
if value
is a DOM Element.
Check if value
is Infinity
or -Infinity
.
Returns true
if value
is an even integer.
Returns true
if value
is an odd integer.
Returns true
if value
is falsy or an empty string, array, object, map, or set.
Returns true
if is.empty(value)
or a string that is all whitespace.
Returns true
if any of the input values
returns true in the predicate
:
1is.any(is.string, {}, true, '🦄'); 2//=> true 3 4is.any(is.boolean, 'unicorns', [], new Map()); 5//=> false
Returns true
if all of the input values
returns true in the predicate
:
1is.all(is.object, {}, new Map(), new Set()); 2//=> true 3 4is.all(is.string, '🦄', [], 'unicorns'); 5//=> false
There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs:
For the ones I found, pick 3 of these.
The most common mistakes I noticed in these modules was using instanceof
for type checking, forgetting that functions are objects, and omitting symbol
as a primitive.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 13/30 approved changesets -- score normalized to 4
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More