UNPKG

molstar

Version:

A comprehensive macromolecular library.

24 lines 1.08 kB
/* * Copyright (c) 2018 Mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com> */ var Expression; (function (Expression) { function Symbol(name) { return { name: name }; } Expression.Symbol = Symbol; function Apply(head, args) { return args ? { head: head, args: args } : { head: head }; } Expression.Apply = Apply; function isArgumentsArray(e) { return !!e && Array.isArray(e); } Expression.isArgumentsArray = isArgumentsArray; function isArgumentsMap(e) { return !!e && !Array.isArray(e); } Expression.isArgumentsMap = isArgumentsMap; function isLiteral(e) { return !isApply(e) && !isSymbol(e); } Expression.isLiteral = isLiteral; function isApply(e) { return !!e && !!e.head && typeof e === 'object'; } Expression.isApply = isApply; function isSymbol(e) { return !!e && typeof e.name === 'string'; } Expression.isSymbol = isSymbol; })(Expression || (Expression = {})); export { Expression }; //# sourceMappingURL=expression.js.map