# fluture-sanctuary-types

> Fluture type definitions for Sanctuary

Latest version **7.1.0** (published 2021-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install fluture-sanctuary-types
pnpm add fluture-sanctuary-types
yarn add fluture-sanctuary-types
bun add fluture-sanctuary-types
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2021-04-06 |
| First published | 2017-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Aldwin Vlasblom |
| Maintainers | avaq, dicearr, davidchambers |
| Keywords | fluture, sanctuary, types, typings, future, algebraic-data-types |

## Links

- npm: https://www.npmjs.com/package/fluture-sanctuary-types
- Repository: https://github.com/fluture-js/fluture-sanctuary-types
- Homepage: https://github.com/fluture-js/fluture-sanctuary-types#readme
- Issues: https://github.com/fluture-js/fluture-sanctuary-types/issues
- npm.io page: https://npm.io/package/fluture-sanctuary-types

## Dependencies (1)

- [sanctuary-type-identifiers](https://npm.io/package/sanctuary-type-identifiers.md) ^3.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 7.1.0 (latest) — 2021-04-06
- 7.0.1 — 2021-01-15
- 7.0.0 — 2020-09-08
- 6.0.1 — 2020-05-11
- 6.0.0 — 2020-05-03
- 5.0.1 — 2020-05-02
- 5.0.0 — 2019-11-17
- 4.1.1 — 2019-09-03
- 4.1.0 — 2019-09-03
- 4.0.0 — 2019-05-07
- 3.1.1 — 2019-03-10
- 3.1.0 — 2019-02-21
- 3.0.0 — 2019-01-28
- 2.2.2 — 2018-08-31
- 2.2.1 — 2018-07-26
- … 9 more at https://npm.io/package/fluture-sanctuary-types/versions

## README

# fluture-sanctuary-types

[Fluture][] type definitions for [Sanctuary][].

## Usage

### Node

```console
$ npm install --save fluture-sanctuary-types
```

Note that you also need [Fluture][] and [sanctuary-def][] installed.
Sanctuary-def comes preinstalled with Sanctuary, so you could install
either one. Fluture has to be installed separately. See `package.json`
for compatible versions (defined in `peerDependencies`).

On Node 12 and up, this module can be loaded directly with `import` or
`require`. On Node versions below 12, `require` or the [esm][]-loader can
be used.

```js
import $ from 'sanctuary-def';
import sanctuary from 'sanctuary';
import {env, FutureType} from 'fluture-sanctuary-types/index.js';
import {resolve} from 'fluture/index.js';

const S = sanctuary.create ({
  checkTypes: process.env.NODE_ENV !== 'production',
  env: sanctuary.env.concat (env)
});

S.is (FutureType ($.String) ($.Number)) (resolve (42));
```

### Deno and Modern Browsers

You can load the EcmaScript module from various content delivery networks:

- [Skypack](https://cdn.skypack.dev/fluture-sanctuary-types@7.1.0)
- [JSPM](https://jspm.dev/fluture-sanctuary-types@7.1.0)
- [jsDelivr](https://cdn.jsdelivr.net/npm/fluture-sanctuary-types@7.1.0/+esm)

### Old Browsers and Code Pens

There's a [UMD][] file included in the NPM package, also available via
jsDelivr: https://cdn.jsdelivr.net/npm/fluture-sanctuary-types@7.1.0/dist/umd.js

This file adds `flutureSanctuaryTypes` to the global scope, or use
CommonJS/AMD when available.

```js
const $ = require ('sanctuary-def');
const sanctuary = require ('sanctuary');
const {env, FutureType} = require ('fluture-sanctuary-types');
const {resolve} = require ('fluture');

const S = sanctuary.create ({
  checkTypes: process.env.NODE_ENV !== 'production',
  env: sanctuary.env.concat (env)
});

S.is (FutureType ($.String) ($.Number)) (resolve (42));
```

#### <a name="FutureType" href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v7.1.0/index.js#L80">`FutureType :: Type -⁠> Type -⁠> Type`</a>

The binary type constructor for members of Future.

```js
> $.test (env)
.        (FutureType ($.String) ($.Number))
.        (Future['fantasy-land/of'] (1));
true
```

#### <a name="ConcurrentFutureType" href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v7.1.0/index.js#L98">`ConcurrentFutureType :: Type -⁠> Type -⁠> Type`</a>

The binary type constructor for members of ConcurrentFuture.

```js
> $.test (env)
.        (ConcurrentFutureType ($.String) ($.Number))
.        (Par['fantasy-land/of'] (1));
true
```

#### <a name="env" href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v7.1.0/index.js#L116">`env :: Array Type`</a>

An Array containing all types applied to [`$.Unknown`][Unknown] for
direct use as a Sanctuary environment, as shown in [Usage](#usage).

[Fluture]:       https://github.com/fluture-js/Fluture
[Sanctuary]:     https://sanctuary.js.org/
[sanctuary-def]: https://github.com/sanctuary-js/sanctuary-def
[Unknown]:       https://github.com/sanctuary-js/sanctuary-def#Unknown
[esm]:           https://github.com/standard-things/esm
[UMD]:           https://github.com/umdjs/umd

---
_Source: https://npm.io/package/fluture-sanctuary-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
