@react-hook/window-size
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -53,7 +53,7 @@ 'use strict' | ||
const useWindowHeight = options => useWindowSize(options)[1] | ||
const useWindowHeight = (options) => useWindowSize(options)[1] | ||
exports.useWindowHeight = useWindowHeight | ||
const useWindowWidth = options => useWindowSize(options)[0] | ||
const useWindowWidth = (options) => useWindowSize(options)[0] | ||
@@ -60,0 +60,0 @@ exports.useWindowWidth = useWindowWidth |
@@ -38,4 +38,4 @@ import React from 'react' | ||
} | ||
export const useWindowHeight = options => useWindowSize(options)[1] | ||
export const useWindowWidth = options => useWindowSize(options)[0] | ||
export const useWindowHeight = (options) => useWindowSize(options)[1] | ||
export const useWindowWidth = (options) => useWindowSize(options)[0] | ||
export default useWindowSize |
{ | ||
"name": "@react-hook/window-size", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"homepage": "https://github.com/jaredLunde/react-hook#readme", | ||
@@ -38,2 +38,3 @@ "repository": "github:jaredLunde/react-hook", | ||
"module": "dist/module/index.js", | ||
"browser": "dist/module/index.js", | ||
"source": "src/index.ts", | ||
@@ -44,9 +45,15 @@ "types": "src/index.d.ts", | ||
"browser": "./dist/module/index.js", | ||
"import": "./dist/module/index.js", | ||
"require": "./dist/main/index.js" | ||
"import": "./dist/esm/index.mjs", | ||
"source": "./src/index.ts", | ||
"require": "./dist/main/index.js", | ||
"default": "./dist/main/index.js", | ||
"types": "./src/index.d.ts" | ||
}, | ||
"./throttled": { | ||
"browser": "./throttled/dist/module/index.js", | ||
"import": "./throttled/dist/module/index.js", | ||
"require": "./throttled/dist/main/index.js" | ||
"import": "./throttled/dist/esm/index.mjs", | ||
"source": "./throttled/src/index.ts", | ||
"require": "./throttled/dist/main/index.js", | ||
"default": "./throttled/dist/main/index.js", | ||
"types": "./throttled/src/index.d.ts" | ||
}, | ||
@@ -65,3 +72,4 @@ "./package.json": "./package.json", | ||
"scripts": { | ||
"build": "npm run build-main && npm run build-module && npm run build-types", | ||
"build": "npm run build-esm && npm run build-main && npm run build-module && npm run build-types", | ||
"build-esm": "npm run compile -- -d dist/esm --env-name esm --out-file-extension .mjs && npm run compile-throttled -- -d throttled/dist/esm --env-name esm --out-file-extension .mjs", | ||
"build-main": "npm run compile -- -d dist/main --env-name main && npm run compile-throttled -- -d throttled/dist/main --env-name main", | ||
@@ -96,19 +104,19 @@ "build-module": "npm run compile -- -d dist/module --env-name module && npm run compile-throttled -- -d throttled/dist/module --env-name module", | ||
"@testing-library/react-hooks": "^3.2.1", | ||
"@types/jest": "latest", | ||
"@typescript-eslint/eslint-plugin": "latest", | ||
"@typescript-eslint/parser": "latest", | ||
"@types/jest": "^25.2.1", | ||
"@typescript-eslint/eslint-plugin": "^2.31.0", | ||
"@typescript-eslint/parser": "^2.31.0", | ||
"babel-plugin-optimize-react": "^0.0.4", | ||
"cross-env": "latest", | ||
"eslint": "latest", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^6.8.0", | ||
"eslint-import-resolver-jest": "latest", | ||
"eslint-plugin-jest": "latest", | ||
"husky": "latest", | ||
"jest": "latest", | ||
"lint-staged": "latest", | ||
"prettier": "latest", | ||
"eslint-plugin-jest": "^23.9.0", | ||
"husky": "^4.2.5", | ||
"jest": "^26.0.1", | ||
"lint-staged": "^10.2.2", | ||
"prettier": "^2.0.5", | ||
"react": "^16.12.0", | ||
"react-test-renderer": "^16.12.0", | ||
"rimraf": "^2.6.3", | ||
"ts-jest": "latest", | ||
"typescript": "latest" | ||
"ts-jest": "^25.5.0", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -115,0 +123,0 @@ "dependencies": { |
@@ -44,3 +44,3 @@ <hr> | ||
const Component = props => { | ||
const Component = (props) => { | ||
const [width, height] = useWindowSize() | ||
@@ -59,3 +59,3 @@ const onlyWidth = useWindowWidth() | ||
const Component = props => { | ||
const Component = (props) => { | ||
const [width, height] = useWindowSize() | ||
@@ -62,0 +62,0 @@ const onlyWidth = useWindowWidth() |
import {useEffect} from 'react' | ||
import useDebounce from '@react-hook/debounce' | ||
const emptyArr = [] | ||
const emptyArr: [] = [] | ||
const emptyObj = {} | ||
@@ -6,0 +6,0 @@ |
@@ -53,7 +53,7 @@ 'use strict' | ||
const useWindowHeight = options => useWindowSize(options)[1] | ||
const useWindowHeight = (options) => useWindowSize(options)[1] | ||
exports.useWindowHeight = useWindowHeight | ||
const useWindowWidth = options => useWindowSize(options)[0] | ||
const useWindowWidth = (options) => useWindowSize(options)[0] | ||
@@ -60,0 +60,0 @@ exports.useWindowWidth = useWindowWidth |
@@ -38,4 +38,4 @@ import React from 'react' | ||
} | ||
export const useWindowHeight = options => useWindowSize(options)[1] | ||
export const useWindowWidth = options => useWindowSize(options)[0] | ||
export const useWindowHeight = (options) => useWindowSize(options)[1] | ||
export const useWindowWidth = (options) => useWindowSize(options)[0] | ||
export default useWindowSize |
import {useEffect} from 'react' | ||
import useThrottle from '@react-hook/throttle' | ||
const emptyArr = [] | ||
const emptyArr: [] = [] | ||
const emptyObj = {} | ||
@@ -6,0 +6,0 @@ |
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
41378
16
601