Gathering detailed insights and metrics for expect-more
Gathering detailed insights and metrics for expect-more
Curried Type Testing library, and Test Matchers for Jest
npm install expect-more
Typescript
Module System
Node Version
NPM Version
expect-more-jest@5.4.1
Published on 04 Jun 2022
expect-more-jest@5.4.0
Published on 04 Jun 2022
expect-more-jasmine@0.3.0
Published on 08 Aug 2021
expect-more-jest@5.3.0
Published on 08 Aug 2021
expect-more@1.1.0
Published on 08 Aug 2021
1.0.1
Published on 29 Jan 2021
TypeScript (98.66%)
JavaScript (1.31%)
Shell (0.03%)
Total Downloads
18,140,378
Last Day
5,119
Last Week
27,362
Last Month
306,319
Last Year
5,320,732
171 Stars
209 Commits
10 Forks
5 Watching
3 Branches
3 Contributors
Latest Version
1.3.0
Package Id
expect-more@1.3.0
Unpacked Size
119.08 kB
Size
24.64 kB
File Count
173
NPM Version
lerna/6.4.1/node@v16.16.0+x64 (darwin)
Node Version
16.16.0
Publised On
31 Jan 2023
Cumulative downloads
Total Downloads
Last day
4.4%
5,119
Compared to previous day
Last week
-54.3%
27,362
Compared to previous week
Last month
-9.1%
306,319
Compared to previous month
Last year
1.3%
5,320,732
Compared to previous year
No dependencies detected.
Curried JavaScript Type Testing Library with Zero Dependencies
npm install expect-more --save-dev
1import { endsWith, isWithinRange } from 'expect-more'; 2 3const result: boolean = endsWith('Script', 'JavaScript'); 4// => true 5 6const endsWithScript = endsWith('Script'); 7endsWithScript('JavaScript'); 8// => true 9 10isWithinRange(10, 20, 21); 11// => false 12 13[0, 1, 1, 2, 3, 5, 8, 13, 21, 34].filter(isWithinRange(5, 15)); 14// => [5, 8, 13]
expect-more
1declare const isBoolean: (value: unknown) => value is boolean; 2declare const isFalse: (value: unknown) => value is false; 3declare const isNull: (value: unknown) => value is null; 4declare const isRegExp: (value: unknown) => value is RegExp; 5declare const isTrue: (value: unknown) => value is true; 6declare const isUndefined: (value: unknown) => value is undefined;
1declare const isAsyncFunction: <T = (...args: any[]) => Promise<any>>( 2 value: unknown, 3) => value is T; 4declare const isFunction: <T = (...args: any[]) => any>(value: unknown) => value is T; 5declare const isGeneratorFunction: <T = Generator>(value: unknown) => value is T; 6declare const throwsAnyError: <T = (...args: any[]) => any>(value: unknown) => value is T; 7declare const throwsErrorOfType: <T = (...args: any[]) => any>( 8 typeName: string, 9 value: unknown, 10) => value is T;
1declare const hasMember: <T = any>(memberName: string, value: unknown) => value is T; 2declare const isEmptyObject: <T = any>(value: unknown) => value is T; 3declare const isNil: (value: unknown) => value is undefined | null; 4declare const isNonEmptyObject: <T = any>(value: unknown) => value is T; 5declare const isObject: <T = any>(value: unknown) => value is T; 6declare const isWalkable: <T = any>(value: unknown) => value is T;
1declare const isArray: <T extends any[] = any[]>(value: unknown) => value is T; 2declare const isArrayIncludingAllOf: <T extends any[] = any[]>(needed: any[], value: unknown) => value is T; 3declare const isArrayIncludingAnyOf: <T extends any[] = any[]>(needed: any[], value: unknown) => value is T; 4declare const isArrayIncludingOnly: <T extends any[] = any[]>(needed: any[], value: unknown) => value is T; 5declare const isArrayOfBooleans: (value: unknown) => value is boolean[]; 6declare const isArrayOfNumbers: (value: unknown) => value is number[]; 7declare const isArrayOfObjects: <T extends any[] = any[]>(value: unknown) => value is T; 8declare const isArrayOfSize: <T extends any[] = any[]>( 9 size: number, 10 value: unknown, 11) => value is T; 12declare const isArrayOfStrings: (value: unknown) => value is string[]; 13declare const isEmptyArray: <T extends [] = []>(any) => value is T; 14declare const isNonEmptyArray: <T extends any[] = any[]>(value: unknown) => value is T;
1declare const isAfter: (other: Date, value: unknown) => value is Date; 2declare const isBefore: (other: Date, value: unknown) => value is Date; 3declare const isDate: (value: unknown) => value is Date; 4declare const isDateBetween: (floor: Date, ceiling: Date, value: unknown) => value is Date; 5declare const isDateInMonth: (index: number, value: unknown) => value is Date; 6declare const isDateInYear: (year: number, value: unknown) => value is Date; 7declare const isDateOnDayOfMonth: (day: number, value: unknown) => value is Date; 8declare const isDateOnDayOfWeek: (index: number, value: unknown) => value is Date; 9declare const isDateOnOrAfter: (other: Date, value: unknown) => value is Date; 10declare const isDateOnOrBefore: (other: Date, value: unknown) => value is Date; 11declare const isValidDate: (value: unknown) => value is Date;
1declare const isCalculable: (value: unknown) => value is number; 2declare const isDecimalNumber: (value: unknown) => value is number; 3declare const isDivisibleBy: (other: number, value: unknown) => value is number; 4declare const isEvenNumber: (value: unknown) => value is number; 5declare const isGreaterThanOrEqualTo: (other: number, value: unknown) => value is number; 6declare const isLessThanOrEqualTo: (other: number, value: unknown) => value is number; 7declare const isNear: (other: number, epsilon: number, value: unknown) => value is number; 8declare const isNegativeNumber: (value: unknown) => value is number; 9declare const isNumber: (value: unknown) => value is number; 10declare const isOddNumber: (value: unknown) => value is number; 11declare const isPositiveNumber: (value: unknown) => value is number; 12declare const isWholeNumber: (value: unknown) => value is number; 13declare const isWithinRange: ( 14 floor: number, 15 ceiling: number, 16 value: unknown, 17) => value is number;
1declare const endsWith: (other: string, value: unknown) => value is string; 2declare const isEmptyString: (value: unknown) => value is string; 3declare const isIso8601: (value: unknown) => value is string; 4declare const isJsonString: (value: unknown) => value is string; 5declare const isLongerThan: (other: string, value: unknown) => value is string; 6declare const isNonEmptyString: (value: unknown) => value is string; 7declare const isSameLengthAs: (other: string, value: unknown) => value is string; 8declare const isShorterThan: (other: string, value: unknown) => value is string; 9declare const isString: (value: unknown) => value is string; 10declare const isVisibleString: (value: unknown) => value is string; 11declare const isWhitespace: (value: unknown) => value is string; 12declare const startsWith: (other: string, value: unknown) => value is string;
expect-more/gen
1declare const withMissingBranches: (value: object | any[]) => Generator; 2declare const withMissingLeaves: (value: object | any[]) => Generator; 3declare const withMissingNodes: (value: object | any[]) => Generator; 4declare const withNullBranches: (value: object | any[]) => Generator; 5declare const withNullLeaves: (value: object | any[]) => Generator; 6declare const withNullNodes: (value: object | any[]) => Generator;
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More