| ; | |
| 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; | |
Xet Storage Details
- Size:
- 759 Bytes
- Xet hash:
- 7d8cac9f98fc7b0afeebf12e2d1ac35cb6a1d76d936ea50984b67c5661269c28
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.