✏️ 编辑:index.js
路径:
/home/boguraj1/public_html/jobsite/node_modules/is-plain-object/index.js
大小:856 B · 修改:2022-11-21 20:09:24 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
/*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; var isObject = require('isobject'); function isObjectObject(o) { return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } module.exports = function isPlainObject(o) { var ctor,prot; if (isObjectObject(o) === false) return false; // If has modified constructor ctor = o.constructor; if (typeof ctor !== 'function') return false; // If has modified prototype prot = ctor.prototype; if (isObjectObject(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { return false; } // Most likely a plain Object return true; };
💾 保存
取消
保存为 UTF-8,换行统一为 LF