MCPcopy Create free account
hub / github.com/apache/pouchdb / createClass

Function createClass

lib/index.js:2585–2594  ·  view source on GitHub ↗
(parent, init)

Source from the content-addressed store, hash-verified

2583}
2584
2585function createClass(parent, init) {
2586 let klass = function (...args) {
2587 if (!(this instanceof klass)) {
2588 return new klass(...args);
2589 }
2590 init.apply(this, args);
2591 };
2592 inherits(klass, parent);
2593 return klass;
2594}
2595
2596// OK, so here's the deal. Consider this code:
2597// var db1 = new PouchDB('foo');

Callers 1

index.jsFile · 0.70

Calls 1

inheritsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…