Update readme.md

This commit is contained in:
Sindre Sorhus 2017-12-09 11:57:43 +01:00 committed by GitHub
parent fe344fd7eb
commit 0abb71615c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,17 +136,17 @@ is.boundFunction(function () {});
#### Miscellaneous
##### .directInstanceOf(value, klass)
##### .directInstanceOf(value, class)
Returns `true` if value is a direct instance of a class of type `klass`.
Returns `true` if `value` is a direct instance of `class`.
```js
class ErrorSubclass extends Error {};
is.directInstanceOf(new Error(), Error);
//=> true
is.directInstanceOf(new ErrorSubclass(), Error);
class UnicornError extends Error {};
is.directInstanceOf(new UnicornError(), Error);
//=> false
```