mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 12:44:14 +00:00
Add node_modules
This commit is contained in:
parent
e1f786311a
commit
554eb0b122
994 changed files with 195567 additions and 0 deletions
66
node_modules/yaml/dist/nodes/Node.js
generated
vendored
Normal file
66
node_modules/yaml/dist/nodes/Node.js
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
'use strict';
|
||||
|
||||
const ALIAS = Symbol.for('yaml.alias');
|
||||
const DOC = Symbol.for('yaml.document');
|
||||
const MAP = Symbol.for('yaml.map');
|
||||
const PAIR = Symbol.for('yaml.pair');
|
||||
const SCALAR = Symbol.for('yaml.scalar');
|
||||
const SEQ = Symbol.for('yaml.seq');
|
||||
const NODE_TYPE = Symbol.for('yaml.node.type');
|
||||
const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;
|
||||
const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;
|
||||
const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;
|
||||
const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;
|
||||
const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;
|
||||
const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;
|
||||
function isCollection(node) {
|
||||
if (node && typeof node === 'object')
|
||||
switch (node[NODE_TYPE]) {
|
||||
case MAP:
|
||||
case SEQ:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isNode(node) {
|
||||
if (node && typeof node === 'object')
|
||||
switch (node[NODE_TYPE]) {
|
||||
case ALIAS:
|
||||
case MAP:
|
||||
case SCALAR:
|
||||
case SEQ:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
||||
class NodeBase {
|
||||
constructor(type) {
|
||||
Object.defineProperty(this, NODE_TYPE, { value: type });
|
||||
}
|
||||
/** Create a copy of this node. */
|
||||
clone() {
|
||||
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
||||
if (this.range)
|
||||
copy.range = this.range.slice();
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
|
||||
exports.ALIAS = ALIAS;
|
||||
exports.DOC = DOC;
|
||||
exports.MAP = MAP;
|
||||
exports.NODE_TYPE = NODE_TYPE;
|
||||
exports.NodeBase = NodeBase;
|
||||
exports.PAIR = PAIR;
|
||||
exports.SCALAR = SCALAR;
|
||||
exports.SEQ = SEQ;
|
||||
exports.hasAnchor = hasAnchor;
|
||||
exports.isAlias = isAlias;
|
||||
exports.isCollection = isCollection;
|
||||
exports.isDocument = isDocument;
|
||||
exports.isMap = isMap;
|
||||
exports.isNode = isNode;
|
||||
exports.isPair = isPair;
|
||||
exports.isScalar = isScalar;
|
||||
exports.isSeq = isSeq;
|
Loading…
Add table
Add a link
Reference in a new issue