@react-hookz/web
Advanced tools
Comparing version 12.2.0 to 12.3.0
@@ -0,1 +1,8 @@ | ||
# [12.3.0](https://github.com/react-hookz/web/compare/v12.2.0...v12.3.0) (2022-01-17) | ||
### Features | ||
* new hook `usePreviousDistinct` ([#585](https://github.com/react-hookz/web/issues/585)) ([1bf69d6](https://github.com/react-hookz/web/commit/1bf69d66e951e8a09427aa5f9f652fb8be5d8229)), closes [#33](https://github.com/react-hookz/web/issues/33) | ||
# [12.2.0](https://github.com/react-hookz/web/compare/v12.1.2...v12.2.0) (2022-01-14) | ||
@@ -2,0 +9,0 @@ |
@@ -20,2 +20,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback'; | ||
export { usePrevious } from './usePrevious/usePrevious'; | ||
export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct'; | ||
export { useSafeState } from './useSafeState/useSafeState'; | ||
@@ -22,0 +23,0 @@ export { useSet } from './useSet/useSet'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useEventListener = exports.useDocumentTitle = exports.useClickOutside = exports.useKeyboardEvent = exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useSyncedRef = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useDebouncedState = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = exports.useMountEffect = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useFirstMountState = exports.useDeepCompareEffect = exports.useDebouncedEffect = exports.useCustomCompareEffect = exports.useConditionalEffect = exports.useThrottledCallback = exports.useRafCallback = exports.useDebouncedCallback = void 0; | ||
exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.useEventListener = exports.useDocumentTitle = exports.useClickOutside = exports.useKeyboardEvent = exports.useMediaQuery = exports.useMeasure = exports.useResizeObserver = exports.useIntersectionObserver = exports.useAsyncAbortable = exports.useAsync = exports.useSessionStorageValue = exports.useLocalStorageValue = exports.useSyncedRef = exports.usePermission = exports.useNetworkState = exports.useValidator = exports.useThrottledState = exports.useToggle = exports.useSet = exports.useSafeState = exports.usePreviousDistinct = exports.usePrevious = exports.useMediatedState = exports.useMap = exports.useDebouncedState = exports.useUpdateEffect = exports.useUnmountEffect = exports.useThrottledEffect = exports.useRerender = exports.useMountEffect = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useFirstMountState = exports.useDeepCompareEffect = exports.useDebouncedEffect = exports.useCustomCompareEffect = exports.useConditionalEffect = exports.useThrottledCallback = exports.useRafCallback = exports.useDebouncedCallback = void 0; | ||
/* eslint-disable import/no-cycle */ | ||
@@ -46,2 +46,4 @@ // Callback | ||
Object.defineProperty(exports, "usePrevious", { enumerable: true, get: function () { return usePrevious_1.usePrevious; } }); | ||
var usePreviousDistinct_1 = require("./usePreviousDistinct/usePreviousDistinct"); | ||
Object.defineProperty(exports, "usePreviousDistinct", { enumerable: true, get: function () { return usePreviousDistinct_1.usePreviousDistinct; } }); | ||
var useSafeState_1 = require("./useSafeState/useSafeState"); | ||
@@ -48,0 +50,0 @@ Object.defineProperty(exports, "useSafeState", { enumerable: true, get: function () { return useSafeState_1.useSafeState; } }); |
@@ -1,5 +0,10 @@ | ||
import { IConditionsPredicate } from '..'; | ||
import { IConditionsPredicate, Predicate } from '..'; | ||
export declare const noop: () => void; | ||
export declare const isBrowser: boolean; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
export declare const isStrictEqual: Predicate; | ||
export declare const truthyAndArrayPredicate: IConditionsPredicate; | ||
export declare const truthyOrArrayPredicate: IConditionsPredicate; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.isBrowser = exports.noop = void 0; | ||
exports.truthyOrArrayPredicate = exports.truthyAndArrayPredicate = exports.isStrictEqual = exports.isBrowser = exports.noop = void 0; | ||
var noop = function () { }; | ||
@@ -9,2 +9,8 @@ exports.noop = noop; | ||
typeof document !== 'undefined'; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
var isStrictEqual = function (prev, next) { return prev === next; }; | ||
exports.isStrictEqual = isStrictEqual; | ||
var truthyAndArrayPredicate = function (conditions) { | ||
@@ -11,0 +17,0 @@ return conditions.every(function (i) { return Boolean(i); }); |
@@ -20,2 +20,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback'; | ||
export { usePrevious } from './usePrevious/usePrevious'; | ||
export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct'; | ||
export { useSafeState } from './useSafeState/useSafeState'; | ||
@@ -22,0 +23,0 @@ export { useSet } from './useSet/useSet'; |
@@ -24,2 +24,3 @@ /* eslint-disable import/no-cycle */ | ||
export { usePrevious } from "./usePrevious/usePrevious.js"; | ||
export { usePreviousDistinct } from "./usePreviousDistinct/usePreviousDistinct.js"; | ||
export { useSafeState } from "./useSafeState/useSafeState.js"; | ||
@@ -26,0 +27,0 @@ export { useSet } from "./useSet/useSet.js"; |
@@ -1,5 +0,10 @@ | ||
import { IConditionsPredicate } from '..'; | ||
import { IConditionsPredicate, Predicate } from '..'; | ||
export declare const noop: () => void; | ||
export declare const isBrowser: boolean; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
export declare const isStrictEqual: Predicate; | ||
export declare const truthyAndArrayPredicate: IConditionsPredicate; | ||
export declare const truthyOrArrayPredicate: IConditionsPredicate; |
@@ -5,2 +5,7 @@ export var noop = function () { }; | ||
typeof document !== 'undefined'; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
export var isStrictEqual = function (prev, next) { return prev === next; }; | ||
export var truthyAndArrayPredicate = function (conditions) { | ||
@@ -7,0 +12,0 @@ return conditions.every(function (i) { return Boolean(i); }); |
@@ -20,2 +20,3 @@ export { useDebouncedCallback } from './useDebouncedCallback/useDebouncedCallback'; | ||
export { usePrevious } from './usePrevious/usePrevious'; | ||
export { usePreviousDistinct, Predicate } from './usePreviousDistinct/usePreviousDistinct'; | ||
export { useSafeState } from './useSafeState/useSafeState'; | ||
@@ -22,0 +23,0 @@ export { useSet } from './useSet/useSet'; |
@@ -24,2 +24,3 @@ /* eslint-disable import/no-cycle */ | ||
export { usePrevious } from "./usePrevious/usePrevious.js"; | ||
export { usePreviousDistinct } from "./usePreviousDistinct/usePreviousDistinct.js"; | ||
export { useSafeState } from "./useSafeState/useSafeState.js"; | ||
@@ -26,0 +27,0 @@ export { useSet } from "./useSet/useSet.js"; |
@@ -1,5 +0,10 @@ | ||
import { IConditionsPredicate } from '..'; | ||
import { IConditionsPredicate, Predicate } from '..'; | ||
export declare const noop: () => void; | ||
export declare const isBrowser: boolean; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
export declare const isStrictEqual: Predicate; | ||
export declare const truthyAndArrayPredicate: IConditionsPredicate; | ||
export declare const truthyOrArrayPredicate: IConditionsPredicate; |
@@ -5,3 +5,8 @@ export const noop = () => { }; | ||
typeof document !== 'undefined'; | ||
/** | ||
* You should only be reaching for this function when you're attempting to prevent multiple | ||
* redefinitions of the same function. In-place strict equality checks are more performant. | ||
*/ | ||
export const isStrictEqual = (prev, next) => prev === next; | ||
export const truthyAndArrayPredicate = (conditions) => conditions.every((i) => Boolean(i)); | ||
export const truthyOrArrayPredicate = (conditions) => conditions.some((i) => Boolean(i)); |
{ | ||
"name": "@react-hookz/web", | ||
"version": "12.2.0", | ||
"version": "12.3.0", | ||
"description": "React hooks done right, for browser and SSR.", | ||
@@ -88,11 +88,11 @@ "keywords": [ | ||
"@jamesacarr/jest-reporter-github-actions": "^0.0.4", | ||
"@react-hookz/eslint-config": "^1.3.4", | ||
"@react-hookz/eslint-config": "^1.4.0", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/github": "^8.0.2", | ||
"@storybook/addon-docs": "^6.4.12", | ||
"@storybook/addon-essentials": "^6.4.12", | ||
"@storybook/addon-links": "^6.4.12", | ||
"@storybook/addon-docs": "^6.4.13", | ||
"@storybook/addon-essentials": "^6.4.13", | ||
"@storybook/addon-links": "^6.4.13", | ||
"@storybook/addons": "^6.4.12", | ||
"@storybook/react": "^6.4.12", | ||
"@storybook/react": "^6.4.13", | ||
"@storybook/storybook-deployer": "^2.8.10", | ||
@@ -120,3 +120,3 @@ "@storybook/theming": "^6.4.12", | ||
"semantic-release": "^18.0.1", | ||
"ts-jest": "^27.1.2", | ||
"ts-jest": "^27.1.3", | ||
"ts-node": "^10.4.0", | ||
@@ -123,0 +123,0 @@ "ttypescript": "^1.5.13", |
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
385100
280
7745