is-plain-obj:检查值是否为普通对象

时间:2021-04-29 11:36:08
【文件属性】:
文件名称:is-plain-obj:检查值是否为普通对象
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-29 11:36:08
JavaScript is-plain-obj 检查值是否为普通对象 如果对象是由{} , new Object()或Object.create(null)创建的,则该对象是普通的。 安装 $ npm install is-plain-obj 用法 import isPlainObject from 'is-plain-obj' ; isPlainObject ( { foo : 'bar' } ) ; //=> true isPlainObject ( new Object ( ) ) ; //=> true isPlainObject ( Object . create ( null ) ) ; //=> true isPlainObject ( [ 1 , 2 , 3 ] ) ; //=> false class Unicorn { } isPlainObject ( new Unicorn ( ) )
【文件预览】:
is-plain-obj-main
----.gitignore(23B)
----.github()
--------security.md(179B)
--------workflows()
--------funding.yml(118B)
----.gitattributes(19B)
----package.json(710B)
----index.test-d.ts(332B)
----readme.md(1KB)
----index.js(248B)
----index.d.ts(533B)
----test.js(1KB)
----.editorconfig(175B)
----license(1KB)
----.npmrc(19B)

网友评论