@graffy/common
Version:
Common libraries that used by various Graffy modules.
28 lines (22 loc) • 634 B
JavaScript
exports.__esModule = true;
exports.isRange = isRange;
exports.isBranch = isBranch;
exports.isLink = isLink;
exports.isOlder = isOlder;
exports.isNewer = isNewer;
function isRange(node) {
return node && typeof node.end !== 'undefined';
}
function isBranch(node) {
return node && typeof node.children !== 'undefined';
}
function isLink(node) {
return node && typeof node.path !== 'undefined';
}
function isOlder(node, version) {
return typeof node.version !== 'undefined' && node.version < version;
}
function isNewer(node, version) {
return typeof node.version !== 'undefined' && node.version > version;
}
;