Skip to content

A helper that generates a static-land module from a fantasy-land type

Notifications You must be signed in to change notification settings

rpominov/fantasy-to-static

Repository files navigation

fantasy-to-static

A helper that generates a static-land module from a fantasy-land type.

Installation

npm install fantasy-to-static

Or using CDN:

<script src="https://unpkg.com/fantasy-to-static/umd/fantasyToStatic.js"></script>
<script>
  var fantasyToStatic = window.FantasyToStatic.fantasyToStatic
</script>

API

fantasyToStatic function

Given a fantasy-land compatible type creates a static-land module for it. Detects supported methods automatically, but you can explicitly specify methods that should be generated by passing an array of names as a second argument.

import {fantasyToStatic} from 'fantasy-to-static'
import IdFL from 'fantasy-land/id'

const Id = fantasyToStatic(IdFL)

Id.map(x => x + 41, Id.of(1)) // IdFL(42)

Development

npm run lobot -- --help

Run lobot commands as npm run lobot -- args...

About

A helper that generates a static-land module from a fantasy-land type

Resources

Stars

Watchers

Forks

Packages

No packages published