Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
expect-more
Advanced tools
Curried JavaScript Type Testing Library with Zero Dependencies
This is a new project which needs a lot of work on documentation. It is under active development so there will likely be changes, but at its core it is a rewrite of the core logic behind the matchers in jasmine-expect which is a mature, well-tested library.
npm install expect-more --save-dev
import { endsWith, isWithinRange } from 'expect-more';
endsWith('Script', 'JavaScript');
// => true
const endsWithScript = endsWith('Script');
endsWithScript('JavaScript');
// => true
isWithinRange(10, 20, 21);
// => false
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34].filter(isWithinRange(5, 15));
// => [5, 8, 13]
isBoolean: (value: any) => boolean
isFalse: (value: any) => boolean
isNull: (value: any) => boolean
isRegExp: (value: any) => boolean
isTrue: (value: any) => boolean
isUndefined: (value: any) => boolean
isAsyncFunction: (value: any) => boolean
isFunction: (value: any) => boolean
isGeneratorFunction: (value: any) => boolean
throwsAnyError: (value: () => void) => boolean
throwsErrorOfType: (typeName: string, value: () => void) => boolean
hasMember: (memberName: string, value: any) => boolean
isEmptyObject: (value: any) => boolean
isNonEmptyObject: (value: any) => boolean
isObject: (value: any) => boolean
isWalkable: (value: any) => boolean
isArray: (value: any) => boolean
isArrayOfBooleans: (value: any) => boolean
isArrayOfNumbers: (value: any) => boolean
isArrayOfObjects: (value: any) => boolean
isArrayOfSize: (size: number, value: any) => boolean
isArrayOfStrings: (value: any) => boolean
isEmptyArray: (any) => boolean
isNonEmptyArray: (value: any) => boolean
isAfter: (other: Date, value: any) => boolean
isBefore: (other: Date, value: any) => boolean
isDate: (value: any) => boolean
isIso8601: (value: any) => boolean
isValidDate: (value: any) => boolean
isCalculable: (value: any) => boolean
isDivisibleBy: (other: number, value: any) => boolean
isEvenNumber: (value: any) => boolean
isGreaterThanOrEqualTo: (other: number, value: any) => boolean
isLessThanOrEqualTo: (other: number, value: any) => boolean
isNear: (other: number, epsilon: number, value: any) => boolean
isNumber: (value: any) => boolean
isOddNumber: (value: any) => boolean
isWholeNumber: (value: any) => boolean
isWithinRange: (floor: number, ceiling: number, value: any) => boolean
endsWith: (other: string, value: any) => boolean
isEmptyString: (value: any) => boolean
isJsonString: (value: any) => boolean
isLongerThan: (other: string, value: any) => boolean
isNonEmptyString: (value: any) => boolean
isSameLengthAs: (other: string, value: any) => boolean
isShorterThan: (other: string, value: any) => boolean
isString: (value: any) => boolean
isWhitespace: (value: any) => boolean
startsWith: (other: string, value: any) => boolean
FAQs
Curried JavaScript Type Testing Library with Zero Dependencies
The npm package expect-more receives a total of 60,906 weekly downloads. As such, expect-more popularity was classified as popular.
We found that expect-more demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.