diff options
Diffstat (limited to 'node_modules/yaml/dist/compose/util-contains-newline.js')
-rw-r--r-- | node_modules/yaml/dist/compose/util-contains-newline.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/node_modules/yaml/dist/compose/util-contains-newline.js b/node_modules/yaml/dist/compose/util-contains-newline.js deleted file mode 100644 index e7aa82d..0000000 --- a/node_modules/yaml/dist/compose/util-contains-newline.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -function containsNewline(key) { - if (!key) - return null; - switch (key.type) { - case 'alias': - case 'scalar': - case 'double-quoted-scalar': - case 'single-quoted-scalar': - if (key.source.includes('\n')) - return true; - if (key.end) - for (const st of key.end) - if (st.type === 'newline') - return true; - return false; - case 'flow-collection': - for (const it of key.items) { - for (const st of it.start) - if (st.type === 'newline') - return true; - if (it.sep) - for (const st of it.sep) - if (st.type === 'newline') - return true; - if (containsNewline(it.key) || containsNewline(it.value)) - return true; - } - return false; - default: - return true; - } -} - -exports.containsNewline = containsNewline; |