【文件属性】:
文件名称:inherit-prototypes:继承一点点紧凑功能的ES6类和ES5的不同原型
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-06 23:12:12
JavaScript
它有什么作用?
该软件包允许您使用类数组的原型来扩展/继承一个类。 与ES6 / ES5兼容。
如何使用
npm install inherit-prototypes --save
var inherit = require ( 'inherit-prototypes' ) ;
//Includes is a class you want to extend Prototypes
class Includes {
someCoolPrototype ( ) { ... }
}
//IWantCoolPrototypes is a class that wants the Includes Prototypes.
class IWantCoolPrototypes extends Array { }
//Create an array of dependencies and call t
【文件预览】:
inherit-prototypes-master
----.gitignore(13B)
----package.json(825B)
----src()
--------inherit-prototypes.js(465B)
----wallaby.js(626B)
----inherit-prototypes.js(465B)
----README.md(2KB)
----tests()
--------test.js(1KB)