Creates a shape for a specific class. Value checks are done through instanceof.
instanceof
Optional
import {classShape, checkValidShape} from 'object-shape-tester';const myShape = classShape(RegExp);checkValidShape(/hi/, myShape); // `true`checkValidShape('hi', myShape); // `false` Copy
import {classShape, checkValidShape} from 'object-shape-tester';const myShape = classShape(RegExp);checkValidShape(/hi/, myShape); // `true`checkValidShape('hi', myShape); // `false`
Creates a shape for a specific class. Value checks are done through
instanceof
.