Comparing version 0.5.8 to 0.6.0
{ | ||
"name": "lazy-ass", | ||
"main": "index.js", | ||
"version": "0.5.8", | ||
"version": "0.6.0", | ||
"homepage": "https://github.com/bahmutov/lazy-ass", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
10
index.js
@@ -102,8 +102,14 @@ (function initLazyAss() { | ||
function register(value, name) { | ||
var registered; | ||
if (typeof window === 'object') { | ||
/* global window */ | ||
window[name] = value; | ||
} else if (typeof global === 'object') { | ||
registered = true; | ||
} | ||
if (typeof global === 'object') { | ||
global[name] = value; | ||
} else { | ||
registered = true; | ||
} | ||
if (!registered) { | ||
throw new Error('Do not know how to register ' + name); | ||
@@ -110,0 +116,0 @@ } |
{ | ||
"name": "lazy-ass", | ||
"description": "Lazy assertions without performance penalty", | ||
"version": "0.5.8", | ||
"version": "0.6.0", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -90,3 +90,3 @@ # lazy-ass | ||
This allows the execution to continue, while your global error handler (like | ||
my favorite [Sentry](http://bahmutov.calepin.co/know-unknown-unknowns-with-sentry.html)) | ||
my favorite [Sentry](http://glebbahmutov.com/blog/know-unknown-unknowns-with-sentry/)) | ||
can still forward the error with all specified information to your server. | ||
@@ -151,3 +151,3 @@ | ||
I described how one can test asynchronous assertion throwing in your own projects | ||
using Jasmine in [a blog post](http://bahmutov.calepin.co/testing-async-lazy-assertion.html). | ||
using Jasmine in [a blog post](http://glebbahmutov.com/blog/testing-async-lazy-assertion/). | ||
@@ -160,3 +160,3 @@ ### Small print | ||
* [glebbahmutov.com](http://glebbahmutov.com) | ||
* [blog](http://bahmutov.calepin.co/) | ||
* [blog](http://glebbahmutov.com/blog) | ||
@@ -163,0 +163,0 @@ License: MIT - do anything with the code, but don't blame me if it does not work. |
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
29520
16
544