Download .opencode/node_modules/yaml/dist/nodes/Scalar.js from Chenloong999/opencode-data: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/yaml/dist/nodes/Scalar.js
- Command line
-
hf download hf://datasets/Chenloong999/opencode-data/.opencode/node_modules/yaml/dist/nodes/Scalar.js
-
curl -L -o Scalar.js https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/yaml/dist/nodes/Scalar.js
759 Bytes
| ; | |
| var identity = require('./identity.js'); | |
| var Node = require('./Node.js'); | |
| var toJS = require('./toJS.js'); | |
| const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); | |
| class Scalar extends Node.NodeBase { | |
| constructor(value) { | |
| super(identity.SCALAR); | |
| this.value = value; | |
| } | |
| toJSON(arg, ctx) { | |
| return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); | |
| } | |
| toString() { | |
| return String(this.value); | |
| } | |
| } | |
| Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; | |
| Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; | |
| Scalar.PLAIN = 'PLAIN'; | |
| Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; | |
| Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; | |
| exports.Scalar = Scalar; | |
| exports.isScalarValue = isScalarValue; | |