REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.76 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/@apidevtools/json-schema-ref-parser/lib/parsers/yaml.js
Text
Base64
"use strict"; const { ParserError } = require("../util/errors"); const yaml = require("js-yaml"); const { JSON_SCHEMA } = require("js-yaml"); module.exports = { /** * The order that this parser will run, in relation to other parsers. * * @type {number} */ order: 200, /** * Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects. * * @type {boolean} */ allowEmpty: true, /** * Determines whether this parser can parse a given file reference. * Parsers that match will be tried, in order, until one successfully parses the file. * Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case * every parser will be tried. * * @type {RegExp|string[]|function} */ canParse: [".yaml", ".yml", ".json"], // JSON is valid YAML /** * Parses the given file as YAML * * @param {object} file - An object containing information about the referenced file * @param {string} file.url - The full URL of the referenced file * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver * @returns {Promise} */ async parse (file) { // eslint-disable-line require-await let data = file.data; if (Buffer.isBuffer(data)) { data = data.toString(); } if (typeof data === "string") { try { return yaml.load(data, { schema: JSON_SCHEMA }); } catch (e) { throw new ParserError(e.message, file.url); } } else { // data is already a JavaScript value (object, array, number, null, NaN, etc.) return data; } } };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
binary.js
1.88 KB
lrw-r--r--
2026-02-23 15:45:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
json.js
1.75 KB
lrw-r--r--
2026-02-23 15:45:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
text.js
2.13 KB
lrw-r--r--
2026-02-23 15:45:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
yaml.js
1.76 KB
lrw-r--r--
2026-02-23 15:45:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).