download
raw
700 Bytes
'use strict';
const utils = require('./utils');
module.exports = (ast, options = {}) => {
let stringify = (node, parent = {}) => {
let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
let invalidNode = node.invalid === true && options.escapeInvalid === true;
let output = '';
if (node.value) {
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
return '\\' + node.value;
}
return node.value;
}
if (node.value) {
return node.value;
}
if (node.nodes) {
for (let child of node.nodes) {
output += stringify(child);
}
}
return output;
};
return stringify(ast);
};

Xet Storage Details

Size:
700 Bytes
·
Xet hash:
0db829a028222af4d035de5bba7e0ac6386874b1b1d7b870ed77fbe3c444791d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.