unherit

WebJar for unherit

License

License

MIT
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

unherit
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

unherit
WebJar for unherit
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/wooorm/unherit

Download unherit

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/unherit/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>unherit</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/unherit/
implementation 'org.webjars.bower:unherit:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.bower/unherit/
implementation ("org.webjars.bower:unherit:1.1.1")
'org.webjars.bower:unherit:jar:1.1.1'
<dependency org="org.webjars.bower" name="unherit" rev="1.1.1">
  <artifact name="unherit" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='unherit', version='1.1.1')
)
libraryDependencies += "org.webjars.bower" % "unherit" % "1.1.1"
[org.webjars.bower/unherit "1.1.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bower » inherits jar [2.0.1,3)
org.webjars.bower » xtend jar [4.0.1,5)

Project Modules

There are no modules declared in this project.

unherit

Build Coverage Downloads Size

Create a custom constructor which can be modified without affecting the original class.

Install

npm:

npm install unherit

Use

var EventEmitter = require('events').EventEmitter
var unherit = require('unherit')

// Create a private class which acts just like `EventEmitter`.
var Emitter = unherit(EventEmitter)

Emitter.prototype.defaultMaxListeners = 0
// Now, all instances of `Emitter` have no maximum listeners, without affecting
// other `EventEmitter`s.

new Emitter().defaultMaxListeners === 0 // => true
new EventEmitter().defaultMaxListeners === undefined // => true
new Emitter() instanceof EventEmitter // => true

API

unherit(Super)

Create a custom constructor which can be modified without affecting the original class.

Parameters
  • Super (Function) — Super-class
Returns

Function — Constructor acting like Super, which can be modified without affecting the original class.

License

MIT © Titus Wormer

Versions

Version
1.1.1