source:
frontend/node_modules/is-plain-obj/index.js
| Last change on this file was 9af201e, checked in by , 11 days ago | |
|---|---|
|
|
| File size: 245 bytes | |
| Line | |
|---|---|
| 1 | 'use strict'; |
| 2 | |
| 3 | module.exports = value => { |
| 4 | if (Object.prototype.toString.call(value) !== '[object Object]') { |
| 5 | return false; |
| 6 | } |
| 7 | |
| 8 | const prototype = Object.getPrototypeOf(value); |
| 9 | return prototype === null || prototype === Object.prototype; |
| 10 | }; |
Note:
See TracBrowser
for help on using the repository browser.
