UNPKG

@platform/state

Version:

A small, simple, strongly typed, [rx/observable] state-machine.

17 lines (16 loc) 319 B
import * as t from './types'; export { t }; import { is } from './is'; export { is }; export const toNodeId = (node) => { if (node === null) { return ''; } if (typeof node === 'string') { return node; } if (typeof node === 'object') { return node.id; } return ''; };