Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 9, 2023
1 parent 11f4ece commit 0e65504
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions instance-of/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ var bool = instanceOf( bar, Foo );

- While the prototype of an `object` created using object literal notion is `undefined`, the function returns `true` when provided an `object` literal and the `Object` constructor. This maintains consistent behavior with the `instanceof` operator.

<!-- FIXME: apparent issue with realms when linting doctest values -->

<!-- eslint-disable stdlib/doctest -->

```javascript
var Object = require( '@stdlib/object/ctor' );

var bool = ( {} instanceof Object );
// returns true

Expand All @@ -91,10 +97,16 @@ var bool = instanceOf( bar, Foo );

## Examples

<!-- FIXME: apparent issue with realms when linting doctest values -->

<!-- eslint-disable stdlib/doctest -->

<!-- eslint no-undef: "error" -->

```javascript
var Number = require( '@stdlib/number/ctor' );
var Object = require( '@stdlib/object/ctor' );
var Function = require( '@stdlib/function/ctor' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var bool = instanceOf( [], Array );
Expand Down

0 comments on commit 0e65504

Please sign in to comment.