mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
node_modules
This commit is contained in:
parent
6fa46f4e34
commit
680eb33f0d
4375 changed files with 1042080 additions and 6 deletions
16
node_modules/inherits/LICENSE
generated
vendored
Normal file
16
node_modules/inherits/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
51
node_modules/inherits/README.md
generated
vendored
Normal file
51
node_modules/inherits/README.md
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
A dead simple way to do inheritance in JS.
|
||||
|
||||
var inherits = require("inherits")
|
||||
|
||||
function Animal () {
|
||||
this.alive = true
|
||||
}
|
||||
Animal.prototype.say = function (what) {
|
||||
console.log(what)
|
||||
}
|
||||
|
||||
inherits(Dog, Animal)
|
||||
function Dog () {
|
||||
Dog.super.apply(this)
|
||||
}
|
||||
Dog.prototype.sniff = function () {
|
||||
this.say("sniff sniff")
|
||||
}
|
||||
Dog.prototype.bark = function () {
|
||||
this.say("woof woof")
|
||||
}
|
||||
|
||||
inherits(Chihuahua, Dog)
|
||||
function Chihuahua () {
|
||||
Chihuahua.super.apply(this)
|
||||
}
|
||||
Chihuahua.prototype.bark = function () {
|
||||
this.say("yip yip")
|
||||
}
|
||||
|
||||
// also works
|
||||
function Cat () {
|
||||
Cat.super.apply(this)
|
||||
}
|
||||
Cat.prototype.hiss = function () {
|
||||
this.say("CHSKKSS!!")
|
||||
}
|
||||
inherits(Cat, Animal, {
|
||||
meow: function () { this.say("miao miao") }
|
||||
})
|
||||
Cat.prototype.purr = function () {
|
||||
this.say("purr purr")
|
||||
}
|
||||
|
||||
|
||||
var c = new Chihuahua
|
||||
assert(c instanceof Chihuahua)
|
||||
assert(c instanceof Dog)
|
||||
assert(c instanceof Animal)
|
||||
|
||||
The actual function is laughably small. 10-lines small.
|
29
node_modules/inherits/inherits.js
generated
vendored
Normal file
29
node_modules/inherits/inherits.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
module.exports = inherits
|
||||
|
||||
function inherits (c, p, proto) {
|
||||
proto = proto || {}
|
||||
var e = {}
|
||||
;[c.prototype, proto].forEach(function (s) {
|
||||
Object.getOwnPropertyNames(s).forEach(function (k) {
|
||||
e[k] = Object.getOwnPropertyDescriptor(s, k)
|
||||
})
|
||||
})
|
||||
c.prototype = Object.create(p.prototype, e)
|
||||
c.super = p
|
||||
}
|
||||
|
||||
//function Child () {
|
||||
// Child.super.call(this)
|
||||
// console.error([this
|
||||
// ,this.constructor
|
||||
// ,this.constructor === Child
|
||||
// ,this.constructor.super === Parent
|
||||
// ,Object.getPrototypeOf(this) === Child.prototype
|
||||
// ,Object.getPrototypeOf(Object.getPrototypeOf(this))
|
||||
// === Parent.prototype
|
||||
// ,this instanceof Child
|
||||
// ,this instanceof Parent])
|
||||
//}
|
||||
//function Parent () {}
|
||||
//inherits(Child, Parent)
|
||||
//new Child
|
7
node_modules/inherits/package.json
generated
vendored
Normal file
7
node_modules/inherits/package.json
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ "name" : "inherits"
|
||||
, "description": "A tiny simple way to do classic inheritance in js"
|
||||
, "version" : "1.0.2"
|
||||
, "keywords" : ["inheritance", "class", "klass", "oop", "object-oriented"]
|
||||
, "main" : "./inherits.js"
|
||||
, "repository" : "https://github.com/isaacs/inherits"
|
||||
, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" }
|
Loading…
Add table
Add a link
Reference in a new issue