breakdancer
Advanced tools
Comparing version 1.0.0 to 1.0.1
18
index.js
@@ -1,5 +0,5 @@ | ||
'use strict'; | ||
import get from 'propget'; | ||
/** | ||
* Small fallback for when the `window` glabal is not accessible in a given | ||
* Small fallback for when the `window` global is not accessible in a given | ||
* environment. This allows the module to still be used in a regular `node` | ||
@@ -65,5 +65,6 @@ * environment. | ||
width () { | ||
return this.window.innerWidth | ||
|| this.window.document.documentElement.clientWidth | ||
|| this.window.document.body.clientWidth; | ||
return get(this.window, 'innerWidth') | ||
|| get(this.window, 'document.documentElement.clientWidth') | ||
|| get(this.window, 'document.body.clientWidth') | ||
|| 0; | ||
} | ||
@@ -78,5 +79,6 @@ | ||
height () { | ||
return this.window.innerHeight | ||
|| this.window.document.documentElement.clientHeight | ||
|| this.window.document.body.clientHeight; | ||
return get(this.window, 'innerHeight') | ||
|| get(this.window, 'document.documentElement.clientHeight') | ||
|| get(this.window, 'document.body.clientHeight') | ||
|| 0; | ||
} | ||
@@ -83,0 +85,0 @@ |
{ | ||
"name": "breakdancer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A breakpoint tracking utility", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha --compilers js:babel/register ./test.js", | ||
"test": "mocha --compilers js:babel-register ./test.js", | ||
"lint": "godaddy-js-style-lint index.js test.js" | ||
@@ -24,9 +24,6 @@ }, | ||
"devDependencies": { | ||
"assume": "1.3.x", | ||
"babel": "5.8.x", | ||
"eslint-plugin-json": "1.2.x", | ||
"eslint-plugin-mocha": "1.1.x", | ||
"eslint-plugin-react": "3.16.x", | ||
"godaddy-style": "1.0.x", | ||
"mocha": "2.4.x", | ||
"assume": "1.4.x", | ||
"babel-register": "6.9.x", | ||
"godaddy-style": "3.1.x", | ||
"mocha": "2.5.x", | ||
"pre-commit": "1.1.x" | ||
@@ -39,3 +36,13 @@ }, | ||
] | ||
}, | ||
"dependencies": { | ||
"babel-preset-es2015": "6.9.x", | ||
"babelify": "7.3.x", | ||
"propget": "1.0.x" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"babel-preset-es2015" | ||
] | ||
} | ||
} |
@@ -1,3 +0,1 @@ | ||
'use strict'; | ||
import Breakdancer from './index'; | ||
@@ -34,2 +32,9 @@ import assume from 'assume'; | ||
it('safely works without existing windows object', function () { | ||
breakdancer = new Breakdancer(specification, {}); | ||
assume(breakdancer.height()).equals(0); | ||
assume(breakdancer.width()).equals(0); | ||
}); | ||
describe('constructor', function () { | ||
@@ -36,0 +41,0 @@ it('stores the specification as arrays', function () { |
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
14980
5
272
3
+ Addedbabel-preset-es2015@6.9.x
+ Addedbabelify@7.3.x
+ Addedpropget@1.0.x
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbabel-code-frame@6.26.0(transitive)
+ Addedbabel-core@6.26.3(transitive)
+ Addedbabel-generator@6.26.1(transitive)
+ Addedbabel-helper-call-delegate@6.24.1(transitive)
+ Addedbabel-helper-define-map@6.26.0(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-hoist-variables@6.24.1(transitive)
+ Addedbabel-helper-optimise-call-expression@6.24.1(transitive)
+ Addedbabel-helper-regex@6.26.0(transitive)
+ Addedbabel-helper-replace-supers@6.24.1(transitive)
+ Addedbabel-helpers@6.24.1(transitive)
+ Addedbabel-messages@6.23.0(transitive)
+ Addedbabel-plugin-check-es2015-constants@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-arrow-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoped-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoping@6.26.0(transitive)
+ Addedbabel-plugin-transform-es2015-classes@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-computed-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-duplicate-keys@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-for-of@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-modules-commonjs@6.26.2(transitive)
+ Addedbabel-plugin-transform-es2015-object-super@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-template-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-typeof-symbol@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-regenerator@6.26.0(transitive)
+ Addedbabel-plugin-transform-strict-mode@6.24.1(transitive)
+ Addedbabel-preset-es2015@6.9.0(transitive)
+ Addedbabel-register@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-template@6.26.0(transitive)
+ Addedbabel-traverse@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabelify@7.3.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddetect-indent@4.0.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedglobals@9.18.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhome-or-tmp@2.0.0(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedjs-tokens@3.0.2(transitive)
+ Addedjsesc@0.5.01.3.0(transitive)
+ Addedjson5@0.5.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedprivate@0.1.8(transitive)
+ Addedpropget@1.0.0(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedregenerator-transform@0.10.1(transitive)
+ Addedregexpu-core@2.0.0(transitive)
+ Addedregjsgen@0.2.0(transitive)
+ Addedregjsparser@0.1.5(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedslash@1.0.0(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-support@0.4.18(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
+ Addedtrim-right@1.0.1(transitive)