is-pojo:检查某物是否是 POJO(Plain Old Javascript Object)

时间:2021-06-14 11:37:04
【文件属性】:
文件名称:is-pojo:检查某物是否是 POJO(Plain Old Javascript Object)
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-14 11:37:04
JavaScript is-pojo 安装 npm install is-pojo 用法 var isPojo = require ( "is-pojo" ) ; isPojo ( { } ) // true // anything besides an absolutely plain object will return false. // here are examples from the tests: function Foo ( ) { } function Bar ( ) { } Bar . prototype . constructor = Object ; isPojo ( function ( ) { } ) // false isPojo ( [ ] ) // false isPojo ( new Date ( ) ) // false isPojo ( true ) ; // fal
【文件预览】:
is-pojo-master
----.gitignore(687B)
----README.md(1KB)
----test()
--------index-test.js(2KB)
----package.json(543B)
----index.js(34B)
----.travis.yml(54B)
----lib()
--------index.js(215B)

网友评论