Files
node_modules
.bin
@alloc
@jridgewell
@mapbox
@nodelib
@tailwindcss
@types
abbrev
accepts
adm-zip
agent-base
ansi-regex
ansi-styles
any-promise
anymatch
aproba
are-we-there-yet
arg
array-flatten
async
balanced-match
bcrypt
binary-extensions
body-parser
brace-expansion
braces
bson
bytes
call-bind
camelcase-css
cassandra-driver
chalk
chokidar
chownr
color-convert
color-name
color-support
commander
concat-map
console-control-strings
content-disposition
content-type
cookie
cookie-parser
cookie-signature
cssesc
debug
delegates
depd
destroy
detect-libc
didyoumean
dlv
ee-first
ejs
emoji-regex
encodeurl
escape-html
etag
express
express-session
fast-glob
fastq
filelist
fill-range
finalhandler
forwarded
fresh
fs
fs-minipass
fs.realpath
fsevents
function-bind
gauge
get-intrinsic
glob
glob-parent
has
has-flag
has-proto
has-symbols
has-unicode
http-errors
https-proxy-agent
iconv-lite
inflight
inherits
ip
ipaddr.js
is-binary-path
is-core-module
is-extglob
is-fullwidth-code-point
is-glob
is-number
jake
jiti
lilconfig
lines-and-columns
long
lru-cache
make-dir
media-typer
memory-pager
merge-descriptors
merge2
methods
micromatch
mime
mime-db
mime-types
mini-svg-data-uri
minimatch
minipass
minizlib
mkdirp
mongodb
mongodb-connection-string-url
ms
mz
nanoid
negotiator
node-addon-api
node-fetch
nopt
normalize-path
npmlog
object-assign
object-hash
object-inspect
on-finished
on-headers
once
parseurl
path-is-absolute
path-parse
path-to-regexp
picocolors
picomatch
pify
pirates
postcss
postcss-import
postcss-js
postcss-less
postcss-load-config
postcss-nested
postcss-selector-parser
postcss-value-parser
proxy-addr
punycode
qs
queue-microtask
random-bytes
range-parser
raw-body
read-cache
readable-stream
readdirp
resolve
reusify
rimraf
run-parallel
safe-buffer
safer-buffer
saslprep
semver
send
serve-static
set-blocking
setprototypeof
side-channel
signal-exit
smart-buffer
socks
source-map
source-map-js
sparse-bitfield
statuses
string-width
string_decoder
strip-ansi
sucrase
supports-color
supports-preserve-symlinks-flag
tailwindcss
tar
thenify
thenify-all
to-regex-range
toidentifier
tr46
ts-interface-checker
type-is
uid-safe
unpipe
util-deprecate
utils-merge
vary
webidl-conversions
whatwg-url
wide-align
wrappy
yallist
yaml
browser
dist
compose
compose-collection.d.ts
compose-collection.js
compose-doc.d.ts
compose-doc.js
compose-node.d.ts
compose-node.js
compose-scalar.d.ts
compose-scalar.js
composer.d.ts
composer.js
resolve-block-map.d.ts
resolve-block-map.js
resolve-block-scalar.d.ts
resolve-block-scalar.js
resolve-block-seq.d.ts
resolve-block-seq.js
resolve-end.d.ts
resolve-end.js
resolve-flow-collection.d.ts
resolve-flow-collection.js
resolve-flow-scalar.d.ts
resolve-flow-scalar.js
resolve-props.d.ts
resolve-props.js
util-contains-newline.d.ts
util-contains-newline.js
util-empty-scalar-position.d.ts
util-empty-scalar-position.js
util-flow-indent-check.d.ts
util-flow-indent-check.js
util-map-includes.d.ts
util-map-includes.js
doc
nodes
parse
schema
stringify
errors.d.ts
errors.js
index.d.ts
index.js
log.d.ts
log.js
options.d.ts
public-api.d.ts
public-api.js
test-events.d.ts
test-events.js
util.d.ts
util.js
visit.d.ts
visit.js
LICENSE
README.md
package.json
util.js
.package-lock.json
public
views
Title.html
cat.gif
index.css
index.html
package-lock.json
package.json
result.js
tailwind.config.js
glink-website/node_modules/yaml/dist/compose/util-contains-newline.js
2023-06-21 15:56:08 -05:00

37 lines
1.1 KiB
JavaScript

'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;