UNPKG

@platform/cell.typesystem

Version:

The 'strongly typed sheets' system of the CellOS.

26 lines (25 loc) 869 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TypeCacheKey = void 0; var TypeCacheKey = (function () { function TypeCacheKey() { } TypeCacheKey.client = function (ns) { var path = []; for (var _i = 1; _i < arguments.length; _i++) { path[_i - 1] = arguments[_i]; } var suffix = path.length === 0 ? '' : "/" + path.join('/'); return "TypeSystem/client/" + ensurePrefix('ns:', ns) + suffix; }; TypeCacheKey.fetch = function (method, ns) { ns = ensurePrefix('ns:', ns); return "TypeSystem/fetch/" + ensurePrefix('ns:', ns) + "/" + method; }; return TypeCacheKey; }()); exports.TypeCacheKey = TypeCacheKey; function ensurePrefix(prefix, text) { text = text.toString(); return text.startsWith(prefix) ? text : "" + prefix + text; }