mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-26 08:47:58 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isInstanceOf = isInstanceOf;
|
||||
/**
|
||||
* @name isInstanceOf
|
||||
* @summary Tests for a instance of a class.
|
||||
* @description
|
||||
* Checks to see if the input value is an instance of the test class.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import { isInstanceOf } from '@pezkuwi/util';
|
||||
*
|
||||
* console.log('isInstanceOf', isInstanceOf(new Array(0), Array)); // => true
|
||||
* ```
|
||||
*/
|
||||
function isInstanceOf(value, Clazz) {
|
||||
return (((value && value.constructor) === Clazz) ||
|
||||
value instanceof Clazz);
|
||||
}
|
||||
Reference in New Issue
Block a user