ramda#propEq TypeScript Examples
The following examples show how to use
ramda#propEq.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: routes.ts From the-fake-backend with ISC License | 6 votes |
export function findRouteMethodByType(methods: Method[], methodType: string) {
const method = methods.find(propEq('type', methodType.toLowerCase()));
if (method) {
return method;
}
throw new Error(`Method with type "${methodType}" not found`);
}
Example #2
Source File: proxy.ts From the-fake-backend with ISC License | 5 votes |
/**
* Find a proxy by name.
*
* @param name Name
*/
private findByName(name: string) {
return this.proxies.find(propEq('name', name));
}