Fix method signature
This commit is contained in:
parent
b407e383f8
commit
dedd701b36
2 changed files with 2 additions and 4 deletions
|
|
@ -136,8 +136,8 @@ namespace is { // tslint:disable-line:no-namespace
|
|||
// tslint:enable:variable-name
|
||||
|
||||
export const nullOrUndefined = (value: any): value is null | undefined => null_(value) || undefined(value);
|
||||
export const numericString = (value: any): value is String =>
|
||||
!Number.isNaN(Number(value)) && !nullOrUndefined(value);
|
||||
export const numericString = (value: string): bool =>
|
||||
!Number.isNaN(Number(value));
|
||||
|
||||
export const array = Array.isArray;
|
||||
export const buffer = isBuffer;
|
||||
|
|
|
|||
|
|
@ -430,8 +430,6 @@ test('is.numericString', t => {
|
|||
t.true(m.numericString('5'));
|
||||
t.true(m.numericString('-3.2'));
|
||||
t.true(m.numericString('Infinity'));
|
||||
t.false(m.numericString(undefined));
|
||||
t.false(m.numericString(null));
|
||||
});
|
||||
|
||||
test('is.array', t => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue