UNPKG

@graffy/common

Version:

Common libraries that used by various Graffy modules.

20 lines (15 loc) 492 B
export function isRange(node) { return node && typeof node.end !== 'undefined'; } export function isBranch(node) { return node && typeof node.children !== 'undefined'; } export function isLink(node) { return node && typeof node.path !== 'undefined'; } export function isOlder(node, version) { return typeof node.version !== 'undefined' && node.version < version; } export function isNewer(node, version) { return typeof node.version !== 'undefined' && node.version > version; }