mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 20:54:14 +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/yaml/browser/dist/schema/common/seq.js
generated
vendored
Normal file
33
node_modules/yaml/browser/dist/schema/common/seq.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { createNode } from '../../doc/createNode.js';
|
||||
import { isSeq } from '../../nodes/Node.js';
|
||||
import { YAMLSeq } from '../../nodes/YAMLSeq.js';
|
||||
|
||||
function createSeq(schema, obj, ctx) {
|
||||
const { replacer } = ctx;
|
||||
const seq = new YAMLSeq(schema);
|
||||
if (obj && Symbol.iterator in Object(obj)) {
|
||||
let i = 0;
|
||||
for (let it of obj) {
|
||||
if (typeof replacer === 'function') {
|
||||
const key = obj instanceof Set ? it : String(i++);
|
||||
it = replacer.call(obj, key, it);
|
||||
}
|
||||
seq.items.push(createNode(it, undefined, ctx));
|
||||
}
|
||||
}
|
||||
return seq;
|
||||
}
|
||||
const seq = {
|
||||
collection: 'seq',
|
||||
createNode: createSeq,
|
||||
default: true,
|
||||
nodeClass: YAMLSeq,
|
||||
tag: 'tag:yaml.org,2002:seq',
|
||||
resolve(seq, onError) {
|
||||
if (!isSeq(seq))
|
||||
onError('Expected a sequence for this tag');
|
||||
return seq;
|
||||
}
|
||||
};
|
||||
|
||||
export { seq };
|
Loading…
Add table
Add a link
Reference in a new issue