UNPKG

@platform/state

Version:

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

20 lines (19 loc) 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toNodeId = exports.is = exports.t = void 0; var t = require("./types"); exports.t = t; var is_1 = require("./is"); Object.defineProperty(exports, "is", { enumerable: true, get: function () { return is_1.is; } }); exports.toNodeId = function (node) { if (node === null) { return ''; } if (typeof node === 'string') { return node; } if (typeof node === 'object') { return node.id; } return ''; };