✏️ 编辑:inherits_browser.js
路径:
/home/boguraj1/public_html/jobsite/node_modules/assert/node_modules/inherits/inherits_browser.js
大小:672 B · 修改:2022-11-21 20:06:42 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF