First development of the deploy action (#6)
Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
Deploy js code to an instance of screeps. Some debugging tools are implemented. Reviewed-on: #6 Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de> Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
14
node_modules/to-buffer/index.js
generated
vendored
Normal file
14
node_modules/to-buffer/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = toBuffer
|
||||
|
||||
var makeBuffer = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from : bufferFrom
|
||||
|
||||
function bufferFrom (buf, enc) {
|
||||
return new Buffer(buf, enc)
|
||||
}
|
||||
|
||||
function toBuffer (buf, enc) {
|
||||
if (Buffer.isBuffer(buf)) return buf
|
||||
if (typeof buf === 'string') return makeBuffer(buf, enc)
|
||||
if (Array.isArray(buf)) return makeBuffer(buf)
|
||||
throw new Error('Input should be a buffer or a string')
|
||||
}
|
Reference in New Issue
Block a user