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:
388 bytes
|
Line | |
---|
1 | import Node from "../../Node.mjs";
|
---|
2 | import { isComment, isDocument } from "./predicates.mjs";
|
---|
3 | class YamlStream extends Node {
|
---|
4 | static type = 'stream';
|
---|
5 | }
|
---|
6 | Object.defineProperty(YamlStream.prototype, 'content', {
|
---|
7 | get() {
|
---|
8 | return Array.isArray(this.children) ? this.children.filter(node => isDocument(node) || isComment(node)) : [];
|
---|
9 | },
|
---|
10 | enumerable: true
|
---|
11 | });
|
---|
12 | export default YamlStream; |
---|
Note:
See
TracBrowser
for help on using the repository browser.