ramda#compose TypeScript Examples

The following examples show how to use ramda#compose. 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: Flickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
mediaUrl = compose<FlickrResponseItem, FlickrMediaURL, string>(
  prop("m"),
  prop("media")
)
Example #2
Source File: Flickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
mediaUrls = compose<FlickrResponse, FlickrResponseItem[], string[]>(
  map(mediaUrl),
  prop("items")
)
Example #3
Source File: Flickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
images = compose(map(img), mediaUrls)
Example #4
Source File: Flickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
render = compose(Impure.setHtml("#js-main"), images)
Example #5
Source File: Flickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
app = compose(Impure.getJSON(render), url)
Example #6
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
mediaUrl = compose<FlickrResponseItem, FlickrMediaURL, string>(
  prop("m"),
  prop("media")
)
Example #7
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
mediaToImg = compose(img, mediaUrl)
Example #8
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
images = compose<
  FlickrResponse,
  FlickrResponseItem[],
  JQuery<HTMLElement>[]
>(map(mediaToImg), prop("items"))
Example #9
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
render = compose(Impure.setHtml("#js-main"), images)
Example #10
Source File: RefactoredFlickr.tsx    From react-js-tutorial with MIT License 5 votes vote down vote up
app = compose(Impure.getJSON(render), url)
Example #11
Source File: permission-overwriter.component.ts    From radiopanel with GNU General Public License v3.0 5 votes vote down vote up
public getPermissionCountByState(permissions: any[], state: string): number {
		// Jesus fuck, these typings suck ass...
		return Object.keys((compose as any)(
			filter(n => n === state),
			pick(permissions.map(x => x.value))
		)(this.control.value)).length;
	}
Example #12
Source File: permission-selector.component.ts    From radiopanel with GNU General Public License v3.0 5 votes vote down vote up
public getEnabledPermissionsCount(permissions: any[]): number {
		// Jesus fuck, these typings suck ass...
		return Object.keys((compose as any)(
			filter(n => !!n),
			pick(permissions.map(x => x.value))
		)(this.control.value)).length;
	}
Example #13
Source File: html-summary.ts    From the-fake-backend with ISC License 5 votes vote down vote up
sortByPath = sortBy(compose(toLower, prop('path')))