mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-12-09 22:30:41 -07:00
node_modules: upgrade
This commit is contained in:
24
node_modules/yaml/browser/dist/nodes/YAMLSeq.js
generated
vendored
24
node_modules/yaml/browser/dist/nodes/YAMLSeq.js
generated
vendored
@@ -1,17 +1,18 @@
|
||||
import { createNode } from '../doc/createNode.js';
|
||||
import { stringifyCollection } from '../stringify/stringifyCollection.js';
|
||||
import { Collection } from './Collection.js';
|
||||
import { SEQ, isScalar } from './Node.js';
|
||||
import { SEQ, isScalar } from './identity.js';
|
||||
import { isScalarValue } from './Scalar.js';
|
||||
import { toJS } from './toJS.js';
|
||||
|
||||
class YAMLSeq extends Collection {
|
||||
static get tagName() {
|
||||
return 'tag:yaml.org,2002:seq';
|
||||
}
|
||||
constructor(schema) {
|
||||
super(SEQ, schema);
|
||||
this.items = [];
|
||||
}
|
||||
static get tagName() {
|
||||
return 'tag:yaml.org,2002:seq';
|
||||
}
|
||||
add(value) {
|
||||
this.items.push(value);
|
||||
}
|
||||
@@ -84,6 +85,21 @@ class YAMLSeq extends Collection {
|
||||
onComment
|
||||
});
|
||||
}
|
||||
static from(schema, obj, ctx) {
|
||||
const { replacer } = ctx;
|
||||
const seq = new this(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;
|
||||
}
|
||||
}
|
||||
function asItemIndex(key) {
|
||||
let idx = isScalar(key) ? key.value : key;
|
||||
|
||||
Reference in New Issue
Block a user