mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 04:34:15 +00:00
Add node_modules
This commit is contained in:
parent
e1f786311a
commit
554eb0b122
994 changed files with 195567 additions and 0 deletions
33
node_modules/reusify/reusify.js
generated
vendored
Normal file
33
node_modules/reusify/reusify.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
'use strict'
|
||||
|
||||
function reusify (Constructor) {
|
||||
var head = new Constructor()
|
||||
var tail = head
|
||||
|
||||
function get () {
|
||||
var current = head
|
||||
|
||||
if (current.next) {
|
||||
head = current.next
|
||||
} else {
|
||||
head = new Constructor()
|
||||
tail = head
|
||||
}
|
||||
|
||||
current.next = null
|
||||
|
||||
return current
|
||||
}
|
||||
|
||||
function release (obj) {
|
||||
tail.next = obj
|
||||
tail = obj
|
||||
}
|
||||
|
||||
return {
|
||||
get: get,
|
||||
release: release
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = reusify
|
Loading…
Add table
Add a link
Reference in a new issue