@glimmer/util
Advanced tools
Comparing version 0.23.0-alpha.10 to 0.23.0-alpha.11
@@ -37,113 +37,2 @@ define('@glimmer/util', ['exports'], function (exports) { 'use strict'; | ||
function unwrap(val) { | ||
if (val === null || val === undefined) throw new Error('Expected value to be present'); | ||
return val; | ||
} | ||
function expect(val, message) { | ||
if (val === null || val === undefined) throw new Error(message); | ||
return val; | ||
} | ||
function unreachable() { | ||
return new Error('unreachable'); | ||
} | ||
// import Logger from './logger'; | ||
// let alreadyWarned = false; | ||
// import Logger from './logger'; | ||
function debugAssert(test, msg) { | ||
// if (!alreadyWarned) { | ||
// alreadyWarned = true; | ||
// Logger.warn("Don't leave debug assertions on in public builds"); | ||
// } | ||
if (!test) { | ||
throw new Error(msg || "assertion failure"); | ||
} | ||
} | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
(function (LogLevel) { | ||
LogLevel[LogLevel["Trace"] = 0] = "Trace"; | ||
LogLevel[LogLevel["Debug"] = 1] = "Debug"; | ||
LogLevel[LogLevel["Warn"] = 2] = "Warn"; | ||
LogLevel[LogLevel["Error"] = 3] = "Error"; | ||
})(exports.LogLevel || (exports.LogLevel = {})); | ||
var NullConsole = function () { | ||
function NullConsole() { | ||
_classCallCheck(this, NullConsole); | ||
} | ||
NullConsole.prototype.log = function log(_message) {}; | ||
NullConsole.prototype.warn = function warn(_message) {}; | ||
NullConsole.prototype.error = function error(_message) {}; | ||
NullConsole.prototype.trace = function trace() {}; | ||
return NullConsole; | ||
}(); | ||
var ALWAYS = void 0; | ||
var Logger = function () { | ||
function Logger(_ref) { | ||
var console = _ref.console, | ||
level = _ref.level; | ||
_classCallCheck(this, Logger); | ||
this.f = ALWAYS; | ||
this.force = ALWAYS; | ||
this.console = console; | ||
this.level = level; | ||
} | ||
Logger.prototype.skipped = function skipped(level) { | ||
return level < this.level; | ||
}; | ||
Logger.prototype.trace = function trace(message) { | ||
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref2$stackTrace = _ref2.stackTrace, | ||
stackTrace = _ref2$stackTrace === undefined ? false : _ref2$stackTrace; | ||
if (this.skipped(exports.LogLevel.Trace)) return; | ||
this.console.log(message); | ||
if (stackTrace) this.console.trace(); | ||
}; | ||
Logger.prototype.debug = function debug(message) { | ||
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref3$stackTrace = _ref3.stackTrace, | ||
stackTrace = _ref3$stackTrace === undefined ? false : _ref3$stackTrace; | ||
if (this.skipped(exports.LogLevel.Debug)) return; | ||
this.console.log(message); | ||
if (stackTrace) this.console.trace(); | ||
}; | ||
Logger.prototype.warn = function warn(message) { | ||
var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref4$stackTrace = _ref4.stackTrace, | ||
stackTrace = _ref4$stackTrace === undefined ? false : _ref4$stackTrace; | ||
if (this.skipped(exports.LogLevel.Warn)) return; | ||
this.console.warn(message); | ||
if (stackTrace) this.console.trace(); | ||
}; | ||
Logger.prototype.error = function error(message) { | ||
if (this.skipped(exports.LogLevel.Error)) return; | ||
this.console.error(message); | ||
}; | ||
return Logger; | ||
}(); | ||
var _console = typeof console === 'undefined' ? new NullConsole() : console; | ||
ALWAYS = new Logger({ console: _console, level: exports.LogLevel.Trace }); | ||
var LOG_LEVEL = exports.LogLevel.Debug; | ||
var logger = new Logger({ console: _console, level: LOG_LEVEL }); | ||
var objKeys = Object.keys; | ||
@@ -179,3 +68,3 @@ | ||
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -202,3 +91,3 @@ var proto = Object.create(null, { | ||
function DictSet() { | ||
_classCallCheck$1(this, DictSet); | ||
_classCallCheck(this, DictSet); | ||
@@ -233,3 +122,3 @@ this.dict = dict(); | ||
function Stack() { | ||
_classCallCheck$1(this, Stack); | ||
_classCallCheck(this, Stack); | ||
@@ -263,6 +152,6 @@ this.stack = []; | ||
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var ListNode = function ListNode(value) { | ||
_classCallCheck$2(this, ListNode); | ||
_classCallCheck$1(this, ListNode); | ||
@@ -275,3 +164,3 @@ this.next = null; | ||
function LinkedList() { | ||
_classCallCheck$2(this, LinkedList); | ||
_classCallCheck$1(this, LinkedList); | ||
@@ -397,3 +286,3 @@ this.clear(); | ||
function ListSlice(head, tail) { | ||
_classCallCheck$2(this, ListSlice); | ||
_classCallCheck$1(this, ListSlice); | ||
@@ -486,5 +375,2 @@ this._head = head; | ||
exports.getAttrNamespace = getAttrNamespace; | ||
exports.assert = debugAssert; | ||
exports.LOGGER = logger; | ||
exports.Logger = Logger; | ||
exports.assign = assign; | ||
@@ -504,5 +390,2 @@ exports.fillNulls = fillNulls; | ||
exports.HAS_NATIVE_WEAKMAP = HAS_NATIVE_WEAKMAP; | ||
exports.unwrap = unwrap; | ||
exports.expect = expect; | ||
exports.unreachable = unreachable; | ||
@@ -509,0 +392,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -16,44 +16,2 @@ 'use strict'; | ||
var _platformUtils = require('./lib/platform-utils'); | ||
Object.keys(_platformUtils).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _platformUtils[key]; | ||
} | ||
}); | ||
}); | ||
var _assert = require('./lib/assert'); | ||
Object.defineProperty(exports, 'assert', { | ||
enumerable: true, | ||
get: function () { | ||
return _interopRequireDefault(_assert).default; | ||
} | ||
}); | ||
var _logger = require('./lib/logger'); | ||
Object.defineProperty(exports, 'LOGGER', { | ||
enumerable: true, | ||
get: function () { | ||
return _interopRequireDefault(_logger).default; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'Logger', { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.Logger; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'LogLevel', { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.LogLevel; | ||
} | ||
}); | ||
var _objectUtils = require('./lib/object-utils'); | ||
@@ -162,2 +120,2 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozt1QkFJUyxBQUFnQixBQUFFLEFBQU0sQUFBa0IsQUFBQzs7Ozs7O0FBQ3BELEFBQWMsQUFBc0IsQUFBQyxBQUNyQyxBQUFPOzs7Ozs7Ozs7Ozs7Ozs7MkNBQUUsQUFBTyxBQUFJLEFBQU0sQUFBRSxBQUFNLEFBQWMsQUFBQyxBQUNqRCxBQUFPOzs7Ozs7Ozs7MkNBQUUsQUFBTyxBQUFJLEFBQU07Ozs7OzttQkFBRSxBQUFNOzs7Ozs7bUJBQUUsQUFBUSxBQUFFLEFBQU0sQUFBYyxBQUFDLEFBRW5FLEFBQU87Ozs7Ozs7Ozt3QkFBRSxBQUFNOzs7Ozs7d0JBQUUsQUFBUyxBQUFFLEFBQU0sQUFBb0IsQUFBQyxBQUN2RCxBQUFPOzs7Ozs7Ozs7aUJBQUUsQUFBVTs7Ozs7O2lCQUFFLEFBQWMsQUFBVyxBQUFNLEFBQVksQUFBQyxBQUVqRSxBQUFPOzs7Ozs7Ozs7d0JBQUUsQUFBSzs7Ozs7O3dCQUFhLEFBQU87Ozs7Ozt3QkFBRSxBQUFJLEFBQUUsQUFBTSxBQUFt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zdHJpbmc+ID0gVDtcbmV4cG9ydCB0eXBlIEZJWE1FPFQsIFMgZXh0ZW5kcyBzdHJpbmc+ID0gVDtcbmV4cG9ydCB0eXBlIFRSVVNUPFQsIFMgZXh0ZW5kcyBzdHJpbmc+ID0gYW55O1xuIl19 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.debugAssert = debugAssert; | ||
exports.prodAssert = prodAssert; | ||
// import Logger from './logger'; | ||
// let alreadyWarned = false; | ||
// import Logger from './logger'; | ||
function debugAssert(test, msg) { | ||
// if (!alreadyWarned) { | ||
// alreadyWarned = true; | ||
// Logger.warn("Don't leave debug assertions on in public builds"); | ||
// } | ||
if (!test) { | ||
throw new Error(msg || "assertion failure"); | ||
} | ||
} | ||
function prodAssert() {} | ||
exports.default = debugAssert; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxBQUFpQztBQUVqQyxBQUE2QjtBQUY3QixBQUlBLEFBSmlDLEFBSWpDLEFBQU07cUJBQXNCLEFBQVMsTUFBRSxBQUFXO0FBQ2hELEFBQXdCO0FBQ3hCLEFBQTBCO0FBQzFCLEFBQXFFO0FBQ3JFLEFBQUk7QUFFSixBQUFFLEFBQUMsUUFBQyxDQUFDLEFBQUksQUFBQyxNQUFDLEFBQUM7QUFDVixjQUFNLElBQUksQUFBSyxNQUFDLEFBQUcsT0FBSSxBQUFtQixBQUFDLEFBQUMsQUFDOUM7QUFBQyxBQUNIO0FBQUMsQUFFRCxBQUFNO3NCQUF3QixDQUFDLEFBRS9CO2tCQUFlLEFBQVcsQUFBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGltcG9ydCBMb2dnZXIgZnJvbSAnLi9sb2dnZXInO1xuXG4vLyBsZXQgYWxyZWFkeVdhcm5lZCA9IGZhbHNlO1xuXG5leHBvcnQgZnVuY3Rpb24gZGVidWdBc3NlcnQodGVzdDogYW55LCBtc2c6IHN0cmluZykge1xuICAvLyBpZiAoIWFscmVhZHlXYXJuZWQpIHtcbiAgLy8gICBhbHJlYWR5V2FybmVkID0gdHJ1ZTtcbiAgLy8gICBMb2dnZXIud2FybihcIkRvbid0IGxlYXZlIGRlYnVnIGFzc2VydGlvbnMgb24gaW4gcHVibGljIGJ1aWxkc1wiKTtcbiAgLy8gfVxuXG4gIGlmICghdGVzdCkge1xuICAgIHRocm93IG5ldyBFcnJvcihtc2cgfHwgXCJhc3NlcnRpb24gZmFpbHVyZVwiKTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gcHJvZEFzc2VydCgpIHt9XG5cbmV4cG9ydCBkZWZhdWx0IGRlYnVnQXNzZXJ0O1xuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIiXX0= |
@@ -1,20 +0,2 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.unwrap = unwrap; | ||
exports.expect = expect; | ||
exports.unreachable = unreachable; | ||
function unwrap(val) { | ||
if (val === null || val === undefined) throw new Error(`Expected value to be present`); | ||
return val; | ||
} | ||
function expect(val, message) { | ||
if (val === null || val === undefined) throw new Error(message); | ||
return val; | ||
} | ||
function unreachable() { | ||
return new Error('unreachable'); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291c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WN0PFQ+KHZhbDogTWF5YmU8VD4sIG1lc3NhZ2U6IHN0cmluZyk6IFQge1xuICBpZiAodmFsID09PSBudWxsIHx8IHZhbCA9PT0gdW5kZWZpbmVkKSB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gIHJldHVybiB2YWwgYXMgVDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVucmVhY2hhYmxlKCk6IEVycm9yIHtcbiAgcmV0dXJuIG5ldyBFcnJvcigndW5yZWFjaGFibGUnKTtcbn1cbiJdfQ== | ||
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybS11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgT3BhcXVlID0ge30gfCB2b2lkIHwgbnVsbCB8IHVuZGVmaW5lZDtcbmV4cG9ydCB0eXBlIE9wdGlvbjxUPiA9IFQgfCBudWxsO1xuZXhwb3J0IHR5cGUgTWF5YmU8VD4gPSBPcHRpb248VD4gfCB1bmRlZmluZWQgfCB2b2lkOyJdfQ== |
@@ -16,44 +16,2 @@ 'use strict'; | ||
var _platformUtils = require('./lib/platform-utils'); | ||
Object.keys(_platformUtils).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _platformUtils[key]; | ||
} | ||
}); | ||
}); | ||
var _assert = require('./lib/assert'); | ||
Object.defineProperty(exports, 'assert', { | ||
enumerable: true, | ||
get: function () { | ||
return _interopRequireDefault(_assert).default; | ||
} | ||
}); | ||
var _logger = require('./lib/logger'); | ||
Object.defineProperty(exports, 'LOGGER', { | ||
enumerable: true, | ||
get: function () { | ||
return _interopRequireDefault(_logger).default; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'Logger', { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.Logger; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'LogLevel', { | ||
enumerable: true, | ||
get: function () { | ||
return _logger.LogLevel; | ||
} | ||
}); | ||
var _objectUtils = require('./lib/object-utils'); | ||
@@ -162,2 +120,2 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozt1QkFJUyxBQUFnQixBQUFFLEFBQU0sQUFBa0IsQUFBQzs7Ozs7O0FBQ3BELEFBQWMsQUFBc0IsQUFBQyxBQUNyQyxBQUFPOzs7Ozs7Ozs7Ozs7Ozs7MkNBQUUsQUFBTyxBQUFJLEFBQU0sQUFBRSxBQUFNLEFBQWMsQUFBQyxBQUNqRCxBQUFPOzs7Ozs7Ozs7MkNBQUUsQUFBTyxBQUFJLEFBQU07Ozs7OzttQkFBRSxBQUFNOzs7Ozs7bUJBQUUsQUFBUSxBQUFFLEFBQU0sQUFBYyxBQUFDLEFBRW5FLEFBQU87Ozs7Ozs7Ozt3QkFBRSxBQUFNOzs7Ozs7d0JBQUUsQUFBUyxBQUFFLEFBQU0sQUFBb0IsQUFBQyxBQUN2RCxBQUFPOzs7Ozs7Ozs7aUJBQUUsQUFBVTs7Ozs7O2lCQUFFLEFBQWMsQUFBVyxBQUFNLEFBQVksQUFBQyxBQUVqRSxBQUFPOzs7Ozs7Ozs7d0JBQUUsQUFBSzs7Ozs7O3dCQUFhLEFBQU87Ozs7Ozt3QkFBRSxBQUFJLEFBQUUsQUFBTSxBQUFtQixBQUFDLEFBQ3BFLEFBQU87Ozs7Ozs7OztzQkFBRSx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QsIFMgZXh0ZW5kcyBzdHJpbmc+ID0gVDtcbmV4cG9ydCB0eXBlIFRSVVNUPFQsIFMgZXh0ZW5kcyBzdHJpbmc+ID0gYW55O1xuIl19 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.debugAssert = debugAssert; | ||
exports.prodAssert = prodAssert; | ||
// import Logger from './logger'; | ||
// let alreadyWarned = false; | ||
// import Logger from './logger'; | ||
function debugAssert(test, msg) { | ||
// if (!alreadyWarned) { | ||
// alreadyWarned = true; | ||
// Logger.warn("Don't leave debug assertions on in public builds"); | ||
// } | ||
if (!test) { | ||
throw new Error(msg || "assertion failure"); | ||
} | ||
} | ||
function prodAssert() {} | ||
exports.default = debugAssert; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxBQUFpQztBQUVqQyxBQUE2QjtBQUY3QixBQUFpQyxBQUlqQyxBQUFNO3FCQUFzQixBQUFTLE1BQUUsQUFBVyxLQUNoRCxBQUF3QjtBQUN4QixBQUEwQjtBQUMxQixBQUFxRTtBQUNyRSxBQUFJO0FBRUosQUFBRSxBQUFDO1FBQUMsQ0FBQyxBQUFJLEFBQUMsTUFBQyxBQUFDLEFBQ1Y7Y0FBTSxJQUFJLEFBQUssTUFBQyxBQUFHLE9BQUksQUFBbUIsQUFBQyxBQUFDLEFBQzlDLEFBQUMsQUFDSDtBQUFDO0FBRUQsQUFBTTtzQkFBd0IsQUFBQyxDQUUvQjtrQkFBZSxBQUFXLEFBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBpbXBvcnQgTG9nZ2VyIGZyb20gJy4vbG9nZ2VyJztcblxuLy8gbGV0IGFscmVhZHlXYXJuZWQgPSBmYWxzZTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRlYnVnQXNzZXJ0KHRlc3Q6IGFueSwgbXNnOiBzdHJpbmcpIHtcbiAgLy8gaWYgKCFhbHJlYWR5V2FybmVkKSB7XG4gIC8vICAgYWxyZWFkeVdhcm5lZCA9IHRydWU7XG4gIC8vICAgTG9nZ2VyLndhcm4oXCJEb24ndCBsZWF2ZSBkZWJ1ZyBhc3NlcnRpb25zIG9uIGluIHB1YmxpYyBidWlsZHNcIik7XG4gIC8vIH1cblxuICBpZiAoIXRlc3QpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IobXNnIHx8IFwiYXNzZXJ0aW9uIGZhaWx1cmVcIik7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHByb2RBc3NlcnQoKSB7fVxuXG5leHBvcnQgZGVmYXVsdCBkZWJ1Z0Fzc2VydDtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIiXX0= |
@@ -1,20 +0,2 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.unwrap = unwrap; | ||
exports.expect = expect; | ||
exports.unreachable = unreachable; | ||
function unwrap(val) { | ||
if (val === null || val === undefined) throw new Error('Expected value to be present'); | ||
return val; | ||
} | ||
function expect(val, message) { | ||
if (val === null || val === undefined) throw new Error(message); | ||
return val; | ||
} | ||
function unreachable() { | ||
return new Error('unreachable'); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybS11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D4sIG1lc3NhZ2U6IHN0cmluZyk6IFQge1xuICBpZiAodmFsID09PSBudWxsIHx8IHZhbCA9PT0gdW5kZWZpbmVkKSB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gIHJldHVybiB2YWwgYXMgVDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVucmVhY2hhYmxlKCk6IEVycm9yIHtcbiAgcmV0dXJuIG5ldyBFcnJvcigndW5yZWFjaGFibGUnKTtcbn1cbiJdfQ== | ||
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybS11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgT3BhcXVlID0ge30gfCB2b2lkIHwgbnVsbCB8IHVuZGVmaW5lZDtcbmV4cG9ydCB0eXBlIE9wdGlvbjxUPiA9IFQgfCBudWxsO1xuZXhwb3J0IHR5cGUgTWF5YmU8VD4gPSBPcHRpb248VD4gfCB1bmRlZmluZWQgfCB2b2lkOyJdfQ== |
export { getAttrNamespace } from './lib/namespaces'; | ||
export * from './lib/platform-utils'; | ||
export { default as assert } from './lib/assert'; | ||
export { default as LOGGER, Logger, LogLevel } from './lib/logger'; | ||
export { assign, fillNulls } from './lib/object-utils'; | ||
@@ -11,2 +8,2 @@ export { ensureGuid, initializeGuid } from './lib/guid'; | ||
export { HAS_NATIVE_WEAKMAP } from './lib/weakmap'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQU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7XG5leHBvcnQgeyBkZWZhdWx0IGFzIEEsIEVNUFRZX0FSUkFZIH0gZnJvbSAnLi9saWIvYXJyYXktdXRpbHMnO1xuZXhwb3J0IHsgSEFTX05BVElWRV9XRUFLTUFQIH0gZnJvbSAnLi9saWIvd2Vha21hcCc7XG5cbmV4cG9ydCB0eXBlIFRTSVNTVUU8VCwgUyBleHRlbmRzIHN0cmluZz4gPSBUO1xuZXhwb3J0IHR5cGUgRklYTUU8VCwgUyBleHRlbmRzIHN0cmluZz4gPSBUO1xuZXhwb3J0IHR5cGUgVFJVU1Q8VCwgUyBleHRlbmRzIHN0cmluZz4gPSBhbnk7XG4iXX0= |
@@ -1,15 +0,1 @@ | ||
// import Logger from './logger'; | ||
// let alreadyWarned = false; | ||
// import Logger from './logger'; | ||
export function debugAssert(test, msg) { | ||
// if (!alreadyWarned) { | ||
// alreadyWarned = true; | ||
// Logger.warn("Don't leave debug assertions on in public builds"); | ||
// } | ||
if (!test) { | ||
throw new Error(msg || "assertion failure"); | ||
} | ||
} | ||
export function prodAssert() { } | ||
export default debugAssert; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlDQUFpQztBQUVqQyw2QkFBNkI7QUFFN0IsQUFKQSxpQ0FBaUM7QUFJakMsTUFBTSxzQkFBc0IsSUFBUyxFQUFFLEdBQVc7SUFDaEQsd0JBQXdCO0lBQ3hCLDBCQUEwQjtJQUMxQixxRUFBcUU7SUFDckUsSUFBSTtJQUVKLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUNWLE1BQU0sSUFBSSxLQUFLLENBQUMsR0FBRyxJQUFJLG1CQUFtQixDQUFDLENBQUM7SUFDOUMsQ0FBQztBQUNILENBQUM7QUFFRCxNQUFNLHlCQUF3QixDQUFDO0FBRS9CLGVBQWUsV0FBVyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gaW1wb3J0IExvZ2dlciBmcm9tICcuL2xvZ2dlcic7XG5cbi8vIGxldCBhbHJlYWR5V2FybmVkID0gZmFsc2U7XG5cbmV4cG9ydCBmdW5jdGlvbiBkZWJ1Z0Fzc2VydCh0ZXN0OiBhbnksIG1zZzogc3RyaW5nKSB7XG4gIC8vIGlmICghYWxyZWFkeVdhcm5lZCkge1xuICAvLyAgIGFscmVhZHlXYXJuZWQgPSB0cnVlO1xuICAvLyAgIExvZ2dlci53YXJuKFwiRG9uJ3QgbGVhdmUgZGVidWcgYXNzZXJ0aW9ucyBvbiBpbiBwdWJsaWMgYnVpbGRzXCIpO1xuICAvLyB9XG5cbiAgaWYgKCF0ZXN0KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKG1zZyB8fCBcImFzc2VydGlvbiBmYWlsdXJlXCIpO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBwcm9kQXNzZXJ0KCkge31cblxuZXhwb3J0IGRlZmF1bHQgZGVidWdBc3NlcnQ7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIiXX0= |
@@ -1,14 +0,1 @@ | ||
export function unwrap(val) { | ||
if (val === null || val === undefined) | ||
throw new Error(`Expected value to be present`); | ||
return val; | ||
} | ||
export function expect(val, message) { | ||
if (val === null || val === undefined) | ||
throw new Error(message); | ||
return val; | ||
} | ||
export function unreachable() { | ||
return new Error('unreachable'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXR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cbmV4cG9ydCBmdW5jdGlvbiBleHBlY3Q8VD4odmFsOiBNYXliZTxUPiwgbWVzc2FnZTogc3RyaW5nKTogVCB7XG4gIGlmICh2YWwgPT09IG51bGwgfHwgdmFsID09PSB1bmRlZmluZWQpIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgcmV0dXJuIHZhbCBhcyBUO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdW5yZWFjaGFibGUoKTogRXJyb3Ige1xuICByZXR1cm4gbmV3IEVycm9yKCd1bnJlYWNoYWJsZScpO1xufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybS11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgT3BhcXVlID0ge30gfCB2b2lkIHwgbnVsbCB8IHVuZGVmaW5lZDtcbmV4cG9ydCB0eXBlIE9wdGlvbjxUPiA9IFQgfCBudWxsO1xuZXhwb3J0IHR5cGUgTWF5YmU8VD4gPSBPcHRpb248VD4gfCB1bmRlZmluZWQgfCB2b2lkOyJdfQ== |
export { getAttrNamespace } from './lib/namespaces'; | ||
export * from './lib/platform-utils'; | ||
export { default as assert } from './lib/assert'; | ||
export { default as LOGGER, Logger, LogLevel } from './lib/logger'; | ||
export { assign, fillNulls } from './lib/object-utils'; | ||
@@ -11,2 +8,2 @@ export { ensureGuid, initializeGuid } from './lib/guid'; | ||
export { HAS_NATIVE_WEAKMAP } from './lib/weakmap'; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF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tICcuL2xpYi9saXN0LXV0aWxzJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgQSwgRU1QVFlfQVJSQVkgfSBmcm9tICcuL2xpYi9hcnJheS11dGlscyc7XG5leHBvcnQgeyBIQVNfTkFUSVZFX1dFQUtNQVAgfSBmcm9tICcuL2xpYi93ZWFrbWFwJztcblxuZXhwb3J0IHR5cGUgVFNJU1NVRTxULCBTIGV4dGVuZHMgc3RyaW5nPiA9IFQ7XG5leHBvcnQgdHlwZSBGSVhNRTxULCBTIGV4dGVuZHMgc3RyaW5nPiA9IFQ7XG5leHBvcnQgdHlwZSBUUlVTVDxULCBTIGV4dGVuZHMgc3RyaW5nPiA9IGFueTtcbiJdfQ== |
@@ -1,15 +0,2 @@ | ||
// import Logger from './logger'; | ||
// let alreadyWarned = false; | ||
// import Logger from './logger'; | ||
export function debugAssert(test, msg) { | ||
// if (!alreadyWarned) { | ||
// alreadyWarned = true; | ||
// Logger.warn("Don't leave debug assertions on in public builds"); | ||
// } | ||
if (!test) { | ||
throw new Error(msg || "assertion failure"); | ||
} | ||
} | ||
export function prodAssert() {} | ||
export default debugAssert; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLEFBQWlDO0FBRWpDLEFBQTZCO0FBRjdCLEFBSUEsQUFKaUM7QUFJakMsQUFBTSw0QkFBc0IsQUFBUyxNQUFFLEFBQVc7QUFDaEQsQUFBd0I7QUFDeEIsQUFBMEI7QUFDMUIsQUFBcUU7QUFDckUsQUFBSTtBQUVKLEFBQUUsQUFBQyxRQUFDLENBQUMsQUFBSSxBQUFDLE1BQUMsQUFBQztBQUNWLGNBQU0sSUFBSSxBQUFLLE1BQUMsQUFBRyxPQUFJLEFBQW1CLEFBQUMsQUFBQyxBQUM5QztBQUFDLEFBQ0g7QUFBQztBQUVELEFBQU0sNkJBQXdCLENBQUM7QUFFL0IsZUFBZSxBQUFXLEFBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBpbXBvcnQgTG9nZ2VyIGZyb20gJy4vbG9nZ2VyJztcblxuLy8gbGV0IGFscmVhZHlXYXJuZWQgPSBmYWxzZTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRlYnVnQXNzZXJ0KHRlc3Q6IGFueSwgbXNnOiBzdHJpbmcpIHtcbiAgLy8gaWYgKCFhbHJlYWR5V2FybmVkKSB7XG4gIC8vICAgYWxyZWFkeVdhcm5lZCA9IHRydWU7XG4gIC8vICAgTG9nZ2VyLndhcm4oXCJEb24ndCBsZWF2ZSBkZWJ1ZyBhc3NlcnRpb25zIG9uIGluIHB1YmxpYyBidWlsZHNcIik7XG4gIC8vIH1cblxuICBpZiAoIXRlc3QpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IobXNnIHx8IFwiYXNzZXJ0aW9uIGZhaWx1cmVcIik7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHByb2RBc3NlcnQoKSB7fVxuXG5leHBvcnQgZGVmYXVsdCBkZWJ1Z0Fzc2VydDtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXJ0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXNzZXJ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIiXX0= |
@@ -1,12 +0,2 @@ | ||
export function unwrap(val) { | ||
if (val === null || val === undefined) throw new Error('Expected value to be present'); | ||
return val; | ||
} | ||
export function expect(val, message) { | ||
if (val === null || val === undefined) throw new Error(message); | ||
return val; | ||
} | ||
export function unreachable() { | ||
return new Error('unreachable'); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64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Wx1ZSB0byBiZSBwcmVzZW50YCk7XG4gIHJldHVybiB2YWwgYXMgVDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGV4cGVjdDxUPih2YWw6IE1heWJlPFQ+LCBtZXNzYWdlOiBzdHJpbmcpOiBUIHtcbiAgaWYgKHZhbCA9PT0gbnVsbCB8fCB2YWwgPT09IHVuZGVmaW5lZCkgdGhyb3cgbmV3IEVycm9yKG1lc3NhZ2UpO1xuICByZXR1cm4gdmFsIGFzIFQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1bnJlYWNoYWJsZSgpOiBFcnJvciB7XG4gIHJldHVybiBuZXcgRXJyb3IoJ3VucmVhY2hhYmxlJyk7XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0tdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwbGF0Zm9ybS11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgT3BhcXVlID0ge30gfCB2b2lkIHwgbnVsbCB8IHVuZGVmaW5lZDtcbmV4cG9ydCB0eXBlIE9wdGlvbjxUPiA9IFQgfCBudWxsO1xuZXhwb3J0IHR5cGUgTWF5YmU8VD4gPSBPcHRpb248VD4gfCB1bmRlZmluZWQgfCB2b2lkOyJdfQ== |
@@ -6,4 +6,2 @@ export interface Destroyable { | ||
export * from './lib/platform-utils'; | ||
export { default as assert } from './lib/assert'; | ||
export { default as LOGGER, Logger, LogLevel } from './lib/logger'; | ||
export { assign, fillNulls } from './lib/object-utils'; | ||
@@ -10,0 +8,0 @@ export { ensureGuid, initializeGuid, HasGuid } from './lib/guid'; |
export declare type Opaque = {} | void | null | undefined; | ||
export declare type Option<T> = T | null; | ||
export declare type Maybe<T> = Option<T> | undefined | void; | ||
export declare function unwrap<T>(val: Maybe<T>): T; | ||
export declare function expect<T>(val: Maybe<T>, message: string): T; | ||
export declare function unreachable(): Error; |
{ | ||
"name": "@glimmer/util", | ||
"version": "0.23.0-alpha.10", | ||
"version": "0.23.0-alpha.11", | ||
"description": "Common utilities used in Glimmer", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tildeio/glimmer/tree/master/packages/@glimmer/util", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177561
52
1995