@ideal-postcodes/jsutil
Advanced tools
Comparing version 4.3.10 to 4.3.11
@@ -0,1 +1,9 @@ | ||
## [4.3.11](https://github.com/ideal-postcodes/jsutil/compare/4.3.10...4.3.11) (2021-05-27) | ||
### Bug Fixes | ||
* **Timer:** Allow custom interval ([0b0ef7d](https://github.com/ideal-postcodes/jsutil/commit/0b0ef7d188b9e94f7c2156038325fffd7c24f477)) | ||
* **Timer:** Make config optional on start method ([e5f6b1a](https://github.com/ideal-postcodes/jsutil/commit/e5f6b1ab849d8a381b814e622054ebe476783caa)) | ||
## [4.3.10](https://github.com/ideal-postcodes/jsutil/compare/4.3.9...4.3.10) (2021-05-25) | ||
@@ -2,0 +10,0 @@ |
@@ -13,3 +13,3 @@ import { Address } from "@ideal-postcodes/api-typings"; | ||
export interface Bind<T extends Config = Config> { | ||
(config: T): void; | ||
(config?: T): void; | ||
} | ||
@@ -16,0 +16,0 @@ export interface PageTest { |
@@ -9,2 +9,3 @@ import { Bind, Start, ParentTest, Stop, PageTest, Config, Selectors, Targets, Binding } from "./types"; | ||
bind: Bind; | ||
interval?: number; | ||
} | ||
@@ -11,0 +12,0 @@ interface TimerControls { |
@@ -51,3 +51,3 @@ "use strict"; | ||
exports.config = config; | ||
const generateTimer = ({ pageTest, bind }) => { | ||
const generateTimer = ({ pageTest, bind, interval = 1000, }) => { | ||
let timer = null; | ||
@@ -65,3 +65,3 @@ const start = (config) => { | ||
} | ||
}, 1000); | ||
}, interval); | ||
return timer; | ||
@@ -68,0 +68,0 @@ }; |
@@ -13,3 +13,3 @@ import { Address } from "@ideal-postcodes/api-typings"; | ||
export interface Bind<T extends Config = Config> { | ||
(config: T): void; | ||
(config?: T): void; | ||
} | ||
@@ -16,0 +16,0 @@ export interface PageTest { |
@@ -9,2 +9,3 @@ import { Bind, Start, ParentTest, Stop, PageTest, Config, Selectors, Targets, Binding } from "./types"; | ||
bind: Bind; | ||
interval?: number; | ||
} | ||
@@ -11,0 +12,0 @@ interface TimerControls { |
@@ -45,3 +45,3 @@ import { toHtmlElem, getAnchors, getParent } from "./dom"; | ||
}; | ||
export const generateTimer = ({ pageTest, bind }) => { | ||
export const generateTimer = ({ pageTest, bind, interval = 1000, }) => { | ||
let timer = null; | ||
@@ -59,3 +59,3 @@ const start = (config) => { | ||
} | ||
}, 1000); | ||
}, interval); | ||
return timer; | ||
@@ -62,0 +62,0 @@ }; |
{ | ||
"name": "@ideal-postcodes/jsutil", | ||
"version": "4.3.10", | ||
"version": "4.3.11", | ||
"description": "Browser Address Autocomplete for api.ideal-postcodes.co.uk", | ||
@@ -5,0 +5,0 @@ "author": { |
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
77181
1808