UNPKG

persistent-typescript

Version:

An easy way to have persistent data on the browser and on nodejs

23 lines (22 loc) 632 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Utils = /** @class */ (function () { function Utils() { } /** * Retrieves the class name from a class instance * @param instance class instance */ Utils.getClassName = function (instance) { return instance.constructor ? instance.constructor.name : null; }; /** * Checks if the library is running on the browser */ Utils.isBrowser = function () { return typeof window !== 'undefined' && typeof window.document !== 'undefined'; }; return Utils; }()); exports.Utils = Utils; ;