shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
isClassInstance
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.is
Check if the passed item is an object class and not a plain object.
Params
- object*-Any
The object to check
Return
- -Boolean
true if is an custom object instance, false if not
Example
import { isClassInstance } from '@blackbyte/sugar/is';
if (isClassInstance({
something: 'hello'
})); // => false
class MyClass {
constructor() {}
}
isClassInstance(new MyClass());Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space