New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-timing-hooks

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timing-hooks - npm Package Compare versions

Comparing version 0.1.0-alpha.0 to 0.1.0-alpha.1

dist/useInterval.d.ts

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

## 0.1.0-alpha.1 (2019-11-07)
### Features
* Added useInterval hook ([799ac50](https://github.com/EricLambrecht/react-timing-hooks/commit/799ac506d3881de6ff2732f2bb998b151e960c5f))
* First draft of useTimeoutEffect ([b62a961](https://github.com/EricLambrecht/react-timing-hooks/commit/b62a96108f641c10191ab6b3146238b236f0b5fe))
## 0.1.0-alpha.0 (2019-10-25)

@@ -7,0 +15,0 @@

5

dist/index.d.ts

@@ -1,2 +0,3 @@

import useTimeoutEffect from './useTimeoutEffect'
export { useTimeoutEffect }
import useTimeoutEffect from './useTimeoutEffect';
import useInterval from './useInterval';
export { useTimeoutEffect, useInterval };

4

dist/index.js

@@ -10,3 +10,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./useTimeoutEffect"], factory);
define(["require", "exports", "./useTimeoutEffect", "./useInterval"], factory);
}

@@ -18,3 +18,5 @@ })(function (require, exports) {

exports.useTimeoutEffect = useTimeoutEffect_1.default;
const useInterval_1 = __importDefault(require("./useInterval"));
exports.useInterval = useInterval_1.default;
});
//# sourceMappingURL=index.js.map

@@ -1,7 +0,3 @@

export declare type TimeoutCreator = (
handler: () => unknown,
timeout: number
) => any
export declare type TimeoutEffectCallback = (
timeoutFunc: TimeoutCreator
) => void | (() => void | undefined)
export declare type TimeoutCreator = (handler: () => unknown, timeout: number) => any;
export declare type TimeoutEffectCallback = (timeoutFunc: TimeoutCreator) => void | (() => void | undefined);
export declare type IntervalCallback = () => unknown;

@@ -1,6 +0,3 @@

import { TimeoutEffectCallback } from './types'
declare const useTimeoutEffect: (
effect: TimeoutEffectCallback,
deps: readonly any[]
) => void
export default useTimeoutEffect
import { TimeoutEffectCallback } from './types';
declare const useTimeoutEffect: (effect: TimeoutEffectCallback, deps: readonly any[]) => void;
export default useTimeoutEffect;

@@ -19,2 +19,3 @@ (function (factory) {

react_1.useEffect(() => {
// TODO: effect result must be returned!
effect(timeoutFunc);

@@ -21,0 +22,0 @@ }, deps);

{
"name": "react-timing-hooks",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"description": "React hooks for creating timing-related effects (setTimeout, setInterval, requestAnimationFrame, requestIdleCallback)",

@@ -9,6 +9,9 @@ "main": "dist/index.js",

"test": "jest",
"test:integration": "rimraf \"./tmp\" && npm run build && jest integration-tests",
"commit": "git-cz",
"prettier:check": "prettier --list-different \"src/**/*.ts\"",
"prettier:write": "prettier --write \"src/**/*.ts\"",
"prettier:check": "prettier --list-different \"{src,integration-tests}/**/*.{ts,tsx}\"",
"prettier:write": "prettier --write \"{src,integration-tests}/**/*.{ts,tsx}\"",
"build": "tsc",
"build:watch": "npm run build -- --watch",
"build:prod": "rimraf \"./dist\" && npm run build -- --outDir \"./dist\"",
"release": "standard-version",

@@ -52,2 +55,3 @@ "prepublishOnly": "npm run test"

"replace": "^1.1.1",
"rimraf": "^3.0.0",
"standard-version": "^7.0.0",

@@ -67,2 +71,3 @@ "ts-jest": "^24.1.0",

"scripts": {
"prerelease": "npm run build:prod",
"postchangelog": "replace \"🐛 \" \"\" CHANGELOG.md&&replace \"✨ \" \"\" CHANGELOG.md"

@@ -69,0 +74,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc