Fix method signature

This commit is contained in:
Itai Steinherz 2018-10-25 00:35:35 +03:00
parent b407e383f8
commit dedd701b36
No known key found for this signature in database
GPG key ID: BE977733D203B00A
2 changed files with 2 additions and 4 deletions

View file

@ -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;

View file

@ -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 => {