ÿØÿà JFIF H H ÿÛ C GIF89;
| System: Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 Current Path : /var/www/talentgenesis_admin_backend/node_modules/alce/lib/ast/ |
| Current File : /var/www/talentgenesis_admin_backend/node_modules/alce/lib/ast/index.js |
var ArrayCollection = require('./array'),
Collection = require('./collection'),
Expression = require('./expression'),
ObjectCollection = require('./object'),
Property = require('./property'),
Value = require('./value');
module.exports = {
Array: ArrayCollection,
Collection: Collection,
Expression: Expression,
Object: ObjectCollection,
Property: Property,
Value: Value,
fromValue: function(value, existingNode, parent, options) {
if (value instanceof ArrayCollection || value instanceof ObjectCollection || value instanceof Value) {
return value;
}
options = options || {};
var node;
if (Array.isArray(value)) {
node = ArrayCollection.fromArray(value, parent, options);
} else if (value && !(value instanceof RegExp) && typeof value === 'object') {
node = ObjectCollection.fromObject(value, parent, options);
} else {
node = Value.fromValue(value, options);
}
if (existingNode) {
node.preamble = existingNode.preamble;
node.prologue = existingNode.prologue;
}
return node;
}
};