Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
static-extend
Advanced tools
Readme
Adds a static
extend
method to a class, to simplify inheritance. Extends the static properties, prototype properties, and descriptors from aParent
constructor ontoChild
constructors.
Install with npm:
$ npm install static-extend --save
var extend = require('static-extend');
Returns a function for extending the static properties, prototype properties, and descriptors from the Parent
constructor onto Child
constructors.
Params
Parent
{Function}: Parent ctorextendFn
{Function}: Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype.Child
{Function}: Child ctorproto
{Object}: Optionally pass additional prototype properties to inherit.returns
{Object}Example
var extend = cu.extend(Parent);
Parent.extend(Child);
// optional methods
Parent.extend(Child, {
foo: function() {},
bar: function() {}
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb, v0.9.0, on March 11, 2016.
FAQs
Adds a static `extend` method to a class, to simplify inheritance. Extends the static properties, prototype properties, and descriptors from a `Parent` constructor onto `Child` constructors.
The npm package static-extend receives a total of 11,513,973 weekly downloads. As such, static-extend popularity was classified as popular.
We found that static-extend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.