main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
507 bytes
|
Line | |
---|
1 | import YamlCollection from "./YamlCollection.mjs";
|
---|
2 | import { isMapping, isScalar, isSequence, isAlias } from "./predicates.mjs";
|
---|
3 | class YamlSequence extends YamlCollection {
|
---|
4 | static type = 'sequence';
|
---|
5 | }
|
---|
6 | Object.defineProperty(YamlSequence.prototype, 'content', {
|
---|
7 | get() {
|
---|
8 | const {
|
---|
9 | children
|
---|
10 | } = this;
|
---|
11 | return Array.isArray(children) ? children.filter(node => isSequence(node) || isMapping(node) || isScalar(node) || isAlias(node)) : [];
|
---|
12 | },
|
---|
13 | enumerable: true
|
---|
14 | });
|
---|
15 | export default YamlSequence; |
---|
Note:
See
TracBrowser
for help on using the repository browser.