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