onetime
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -1,2 +0,2 @@ | ||
declare namespace oneTime { | ||
declare namespace onetime { | ||
interface Options { | ||
@@ -12,3 +12,3 @@ /** | ||
declare const oneTime: { | ||
declare const onetime: { | ||
/** | ||
@@ -37,3 +37,3 @@ Ensure a function is only called once. When called multiple times it will return the return value from the first call. | ||
fn: (...arguments: ArgumentsType) => ReturnType, | ||
options?: oneTime.Options | ||
options?: onetime.Options | ||
): (...arguments: ArgumentsType) => ReturnType; | ||
@@ -63,5 +63,5 @@ | ||
// TODO: Remove this for the next major release | ||
default: typeof oneTime; | ||
default: typeof onetime; | ||
}; | ||
export = oneTime; | ||
export = onetime; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const oneTime = (function_, options = {}) => { | ||
const onetime = (function_, options = {}) => { | ||
if (typeof function_ !== 'function') { | ||
@@ -35,5 +35,5 @@ throw new TypeError('Expected a function'); | ||
module.exports = oneTime; | ||
module.exports = onetime; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = oneTime; | ||
module.exports.default = onetime; | ||
@@ -40,0 +40,0 @@ module.exports.callCount = function_ => { |
{ | ||
"name": "onetime", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "Ensure a function is only called once", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |