Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fp-ts-contrib

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fp-ts-contrib - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

es6/Free.d.ts

5

CHANGELOG.md

@@ -16,2 +16,7 @@ # Changelog

# 0.1.3
- **New Feature**
- add `Free` monad, #19 (@YBogomolov)
# 0.1.2

@@ -18,0 +23,0 @@

10

es6/Align/Array.d.ts

@@ -7,3 +7,3 @@ import { URI } from 'fp-ts/lib/Array';

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -30,3 +30,3 @@ export declare const alignArray: Align1<URI>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -47,3 +47,3 @@ export declare function lpadZipWith<A, B, C>(xs: Array<A>, ys: Array<B>, f: (a: Option<A>, b: B) => C): Array<C>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -65,3 +65,3 @@ export declare function lpadZip<A, B>(xs: Array<A>, ys: Array<B>): Array<[Option<A>, B]>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -82,4 +82,4 @@ export declare function rpadZipWith<A, B, C>(xs: Array<A>, ys: Array<B>, f: (a: A, b: Option<B>) => C): Array<C>;

*
* @since 0.0.3
* @since 0.1.0
*/
export declare function rpadZip<A, B>(xs: Array<A>, ys: Array<B>): Array<[A, Option<B>]>;

@@ -9,3 +9,3 @@ import { left, right, both } from 'fp-ts/lib/These';

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -34,3 +34,3 @@ export const alignArray = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -69,3 +69,3 @@ alignWith: (fa, fb, f) => {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -95,3 +95,3 @@ align: (fa, fb) => {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -114,3 +114,3 @@ export function lpadZipWith(xs, ys, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -134,3 +134,3 @@ export function lpadZip(xs, ys) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -153,3 +153,3 @@ export function rpadZipWith(xs, ys, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -156,0 +156,0 @@ export function rpadZip(xs, ys) {

@@ -17,3 +17,3 @@ /**

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -24,3 +24,3 @@ export interface Align<F> extends Semialign<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -31,3 +31,3 @@ export interface Align1<F extends URIS> extends Semialign1<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -38,3 +38,3 @@ export interface Align2<F extends URIS2> extends Semialign2<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -45,3 +45,3 @@ export interface Align2C<F extends URIS2, L> extends Semialign2C<F, L> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -61,3 +61,3 @@ export interface Align3<F extends URIS3> extends Semialign3<F> {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -81,3 +81,3 @@ export declare function salign<F extends URIS3, A, L>(F: Align3<F>, S: Semigroup<A>): <U, L>(fx: Kind3<F, U, L, A>, fy: Kind3<F, U, L, A>) => Kind3<F, U, L, A>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -113,3 +113,3 @@ export declare function padZip<F extends URIS3, L>(F: Align3<F>): <U, L, A, B>(fa: Kind3<F, U, L, A>, fb: Kind3<F, U, L, B>) => Kind3<F, U, L, [Option<A>, Option<B>]>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -116,0 +116,0 @@ export declare function padZipWith<F extends URIS3, L>(F: Align3<F>): <U, L, A, B, C>(fa: Kind3<F, U, L, A>, fb: Kind3<F, U, L, B>, f: (a: Option<A>, b: Option<B>) => C) => Kind3<F, U, L, C>;

@@ -6,4 +6,4 @@ import { URI } from 'fp-ts/lib/Option';

*
* @since 0.0.3
* @since 0.1.0
*/
export declare const alignOption: Align1<URI>;

@@ -7,3 +7,3 @@ import { some, none, option, URI, isSome, isNone } from 'fp-ts/lib/Option';

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -16,3 +16,3 @@ export const alignOption = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -37,3 +37,3 @@ nil: () => none,

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -67,5 +67,5 @@ alignWith: (fa, fb, f) => {

*
* @since 0.0.3
* @since 0.1.0
*/
align: (fa, fb) => alignOption.alignWith(fa, fb, identity)
};
import { These } from 'fp-ts/lib/These';
/**
* @since 0.1.0
*/
export declare function alignWith<K extends string, P extends string, A, B, C>(fa: Record<K, A>, fb: Record<P, B>, f: (x: These<A, B>) => C): Record<K | P, C>;
export declare function alignWith<A, B, C>(fa: Record<string, A>, fb: Record<string, B>, f: (x: These<A, B>) => C): Record<string, C>;
/**
* @since 0.1.0
*/
export declare function align<K extends string, P extends string, A, B>(fa: Record<K, A>, fb: Record<P, B>): Record<K | P, These<A, B>>;
export declare function align<A, B>(fa: Record<string, A>, fb: Record<string, B>): Record<string, These<A, B>>;
export declare const nil: <A>() => Record<string, A>;
/**
* @since 0.1.0
*/
export declare function nil<A>(): Record<string, A>;

@@ -24,2 +24,7 @@ import * as R from 'fp-ts/lib/Record';

}
export const nil = () => R.empty;
/**
* @since 0.1.0
*/
export function nil() {
return R.empty;
}

@@ -51,2 +51,34 @@ import { Alt1 } from 'fp-ts/lib/Alt';

declare const alt: <A>(that: () => ArrayOption<A>) => (fa: ArrayOption<A>) => ArrayOption<A>, ap: <A>(fa: ArrayOption<A>) => <B>(fab: ArrayOption<(a: A) => B>) => ArrayOption<B>, apFirst: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<A>, apSecond: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<B>, chain: <A, B>(f: (a: A) => ArrayOption<B>) => (ma: ArrayOption<A>) => ArrayOption<B>, chainFirst: <A, B>(f: (a: A) => ArrayOption<B>) => (ma: ArrayOption<A>) => ArrayOption<A>, flatten: <A>(mma: ArrayOption<ArrayOption<A>>) => ArrayOption<A>, map: <A, B>(f: (a: A) => B) => (fa: ArrayOption<A>) => ArrayOption<B>;
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -49,2 +49,34 @@ import { array, of } from 'fp-ts/lib/Array';

const { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map } = pipeable(arrayOption);
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -6,2 +6,4 @@ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';

* You can use `Array.chunksOf` to provide the `as` argument.
*
* @since 0.1.0
*/

@@ -8,0 +10,0 @@ export declare function batchTraverse<M extends URIS3>(M: Monad3<M>): <U, L, A, B>(as: Array<Array<A>>, f: (a: A) => Kind3<M, U, L, B>) => Kind3<M, U, L, Array<B>>;

import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';
import { Monad, Monad1, Monad2, Monad2C, Monad3 } from 'fp-ts/lib/Monad';
declare type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
/**
* @since 0.1.0
*/
export interface Do3<M extends URIS3, S extends object> {

@@ -26,2 +29,5 @@ do: <U, L>(ma: Kind3<M, U, L, unknown>) => Do3C<M, S, U, L>;

}
/**
* @since 0.1.0
*/
export interface Do3C<M extends URIS3, S extends object, U, L> {

@@ -49,2 +55,5 @@ do: (ma: Kind3<M, U, L, unknown>) => Do3C<M, S, U, L>;

}
/**
* @since 0.1.0
*/
export interface Do2<M extends URIS2, S extends object> {

@@ -72,2 +81,5 @@ do: <L>(ma: Kind2<M, L, unknown>) => Do2C<M, S, L>;

}
/**
* @since 0.1.0
*/
export interface Do2C<M extends URIS2, S extends object, L> {

@@ -95,2 +107,5 @@ do: (ma: Kind2<M, L, unknown>) => Do2C<M, S, L>;

}
/**
* @since 0.1.0
*/
export interface Do1<M extends URIS, S extends object> {

@@ -118,2 +133,5 @@ do: (ma: Kind<M, unknown>) => Do1<M, S>;

}
/**
* @since 0.1.0
*/
export interface Do0<M, S extends object> {

@@ -142,3 +160,3 @@ do: (ma: HKT<M, unknown>) => Do0<M, S>;

/**
* This function provides a simuation of Haskell do notation. The `bind` / `bindL` functions contributes to a threaded
* This function provides a simulation of Haskell do notation. The `bind` / `bindL` functions contributes to a threaded
* scope that is available to each subsequent step. The `do` / `doL` functions can be used to perform computations that

@@ -145,0 +163,0 @@ * add nothing to the scope. The `return` function lifts the given callback to the monad context. Finally the `done`

@@ -53,2 +53,30 @@ import * as I from 'fp-ts/lib/IO';

declare const ap: <E, A>(fa: ReaderIO<E, A>) => <B>(fab: ReaderIO<E, (a: A) => B>) => ReaderIO<E, B>, apFirst: <E, B>(fb: ReaderIO<E, B>) => <A>(fa: ReaderIO<E, A>) => ReaderIO<E, A>, apSecond: <e, B>(fb: ReaderIO<e, B>) => <A>(fa: ReaderIO<e, A>) => ReaderIO<e, B>, chain: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, B>, chainFirst: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, A>, flatten: <E, A>(mma: ReaderIO<E, ReaderIO<E, A>>) => ReaderIO<E, A>, map: <A, B>(f: (a: A) => B) => <E>(fa: ReaderIO<E, A>) => ReaderIO<E, B>;
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -48,2 +48,30 @@ import * as I from 'fp-ts/lib/IO';

const { ap, apFirst, apSecond, chain, chainFirst, flatten, map } = pipeable(readerIO);
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -21,3 +21,3 @@ /**

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -29,3 +29,3 @@ export interface Semialign<F> extends Functor<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -37,3 +37,3 @@ export interface Semialign1<F extends URIS> extends Functor1<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -45,3 +45,3 @@ export interface Semialign2<F extends URIS2> extends Functor2<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -53,3 +53,3 @@ export interface Semialign2C<F extends URIS2, L> extends Functor2C<F, L> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -56,0 +56,0 @@ export interface Semialign3<F extends URIS3> extends Functor3<F> {

@@ -6,4 +6,4 @@ import { URI } from 'fp-ts/lib/NonEmptyArray';

*
* @since 0.0.3
* @since 0.1.0
*/
export declare const semialignNonEmptyArray: Semialign1<URI>;

@@ -7,3 +7,3 @@ import { nonEmptyArray, URI, cons, head, tail } from 'fp-ts/lib/NonEmptyArray';

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -28,3 +28,3 @@ export const semialignNonEmptyArray = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -46,3 +46,3 @@ alignWith: (fa, fb, f) => {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -49,0 +49,0 @@ align: (fa, fb) => {

@@ -65,2 +65,30 @@ import * as I from 'fp-ts/lib/IO';

declare const ap: <E, A>(fa: StateIO<E, A>) => <B>(fab: StateIO<E, (a: A) => B>) => StateIO<E, B>, apFirst: <E, B>(fb: StateIO<E, B>) => <A>(fa: StateIO<E, A>) => StateIO<E, A>, apSecond: <e, B>(fb: StateIO<e, B>) => <A>(fa: StateIO<e, A>) => StateIO<e, B>, chain: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, B>, chainFirst: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, A>, flatten: <E, A>(mma: StateIO<E, StateIO<E, A>>) => StateIO<E, A>, map: <A, B>(f: (a: A) => B) => <E>(fa: StateIO<E, A>) => StateIO<E, B>;
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -58,2 +58,30 @@ import * as I from 'fp-ts/lib/IO';

const { ap, apFirst, apSecond, chain, chainFirst, flatten, map } = pipeable(stateIO);
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -113,2 +113,46 @@ import { Either } from 'fp-ts/lib/Either';

};
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map, filterOrElse, fromEither, fromOption, fromPredicate };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map,
/**
* @since 0.1.0
*/
filterOrElse,
/**
* @since 0.1.0
*/
fromEither,
/**
* @since 0.1.0
*/
fromOption,
/**
* @since 0.1.0
*/
fromPredicate };

@@ -110,2 +110,46 @@ import { getStateM } from 'fp-ts/lib/StateT';

const { ap, apFirst, apSecond, chain, chainFirst, flatten, map, filterOrElse, fromEither, fromOption, fromPredicate } = pipeable(stateTaskEither);
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map, filterOrElse, fromEither, fromOption, fromPredicate };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map,
/**
* @since 0.1.0
*/
filterOrElse,
/**
* @since 0.1.0
*/
fromEither,
/**
* @since 0.1.0
*/
fromOption,
/**
* @since 0.1.0
*/
fromPredicate };

@@ -52,2 +52,34 @@ import { Alt1 } from 'fp-ts/lib/Alt';

declare const alt: <A>(that: () => TaskOption<A>) => (fa: TaskOption<A>) => TaskOption<A>, ap: <A>(fa: TaskOption<A>) => <B>(fab: TaskOption<(a: A) => B>) => TaskOption<B>, apFirst: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<A>, apSecond: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<B>, chain: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<B>, chainFirst: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<A>, flatten: <A>(mma: TaskOption<TaskOption<A>>) => TaskOption<A>, map: <A, B>(f: (a: A) => B) => (fa: TaskOption<A>) => TaskOption<B>;
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -49,2 +49,34 @@ import { task, of } from 'fp-ts/lib/Task';

const { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map } = pipeable(taskOption);
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -20,3 +20,3 @@ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';

*
* @since 0.0.1
* @since 0.1.0
*/

@@ -23,0 +23,0 @@ export declare function time<M extends URIS3>(M: MonadIO3<M>): <U, L, A>(ma: Kind3<M, U, L, A>) => Kind3<M, U, L, [A, number]>;

@@ -7,3 +7,3 @@ import { URI } from 'fp-ts/lib/Array';

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -30,3 +30,3 @@ export declare const alignArray: Align1<URI>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -47,3 +47,3 @@ export declare function lpadZipWith<A, B, C>(xs: Array<A>, ys: Array<B>, f: (a: Option<A>, b: B) => C): Array<C>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -65,3 +65,3 @@ export declare function lpadZip<A, B>(xs: Array<A>, ys: Array<B>): Array<[Option<A>, B]>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -82,4 +82,4 @@ export declare function rpadZipWith<A, B, C>(xs: Array<A>, ys: Array<B>, f: (a: A, b: Option<B>) => C): Array<C>;

*
* @since 0.0.3
* @since 0.1.0
*/
export declare function rpadZip<A, B>(xs: Array<A>, ys: Array<B>): Array<[A, Option<B>]>;

@@ -11,3 +11,3 @@ "use strict";

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -36,3 +36,3 @@ exports.alignArray = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -71,3 +71,3 @@ alignWith: function (fa, fb, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -97,3 +97,3 @@ align: function (fa, fb) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -117,3 +117,3 @@ function lpadZipWith(xs, ys, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -138,3 +138,3 @@ function lpadZip(xs, ys) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -158,3 +158,3 @@ function rpadZipWith(xs, ys, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -161,0 +161,0 @@ function rpadZip(xs, ys) {

@@ -17,3 +17,3 @@ /**

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -24,3 +24,3 @@ export interface Align<F> extends Semialign<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -31,3 +31,3 @@ export interface Align1<F extends URIS> extends Semialign1<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -38,3 +38,3 @@ export interface Align2<F extends URIS2> extends Semialign2<F> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -45,3 +45,3 @@ export interface Align2C<F extends URIS2, L> extends Semialign2C<F, L> {

/**
* @since 0.0.3
* @since 0.1.0
*/

@@ -61,3 +61,3 @@ export interface Align3<F extends URIS3> extends Semialign3<F> {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -81,3 +81,3 @@ export declare function salign<F extends URIS3, A, L>(F: Align3<F>, S: Semigroup<A>): <U, L>(fx: Kind3<F, U, L, A>, fy: Kind3<F, U, L, A>) => Kind3<F, U, L, A>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -113,3 +113,3 @@ export declare function padZip<F extends URIS3, L>(F: Align3<F>): <U, L, A, B>(fa: Kind3<F, U, L, A>, fb: Kind3<F, U, L, B>) => Kind3<F, U, L, [Option<A>, Option<B>]>;

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -116,0 +116,0 @@ export declare function padZipWith<F extends URIS3, L>(F: Align3<F>): <U, L, A, B, C>(fa: Kind3<F, U, L, A>, fb: Kind3<F, U, L, B>, f: (a: Option<A>, b: Option<B>) => C) => Kind3<F, U, L, C>;

@@ -6,4 +6,4 @@ import { URI } from 'fp-ts/lib/Option';

*
* @since 0.0.3
* @since 0.1.0
*/
export declare const alignOption: Align1<URI>;

@@ -9,3 +9,3 @@ "use strict";

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -18,3 +18,3 @@ exports.alignOption = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -39,3 +39,3 @@ nil: function () { return Option_1.none; },

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -69,5 +69,5 @@ alignWith: function (fa, fb, f) {

*
* @since 0.0.3
* @since 0.1.0
*/
align: function (fa, fb) { return exports.alignOption.alignWith(fa, fb, function_1.identity); }
};
import { These } from 'fp-ts/lib/These';
/**
* @since 0.1.0
*/
export declare function alignWith<K extends string, P extends string, A, B, C>(fa: Record<K, A>, fb: Record<P, B>, f: (x: These<A, B>) => C): Record<K | P, C>;
export declare function alignWith<A, B, C>(fa: Record<string, A>, fb: Record<string, B>, f: (x: These<A, B>) => C): Record<string, C>;
/**
* @since 0.1.0
*/
export declare function align<K extends string, P extends string, A, B>(fa: Record<K, A>, fb: Record<P, B>): Record<K | P, These<A, B>>;
export declare function align<A, B>(fa: Record<string, A>, fb: Record<string, B>): Record<string, These<A, B>>;
export declare const nil: <A>() => Record<string, A>;
/**
* @since 0.1.0
*/
export declare function nil<A>(): Record<string, A>;

@@ -30,2 +30,8 @@ "use strict";

exports.align = align;
exports.nil = function () { return R.empty; };
/**
* @since 0.1.0
*/
function nil() {
return R.empty;
}
exports.nil = nil;

@@ -51,2 +51,34 @@ import { Alt1 } from 'fp-ts/lib/Alt';

declare const alt: <A>(that: () => ArrayOption<A>) => (fa: ArrayOption<A>) => ArrayOption<A>, ap: <A>(fa: ArrayOption<A>) => <B>(fab: ArrayOption<(a: A) => B>) => ArrayOption<B>, apFirst: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<A>, apSecond: <B>(fb: ArrayOption<B>) => <A>(fa: ArrayOption<A>) => ArrayOption<B>, chain: <A, B>(f: (a: A) => ArrayOption<B>) => (ma: ArrayOption<A>) => ArrayOption<B>, chainFirst: <A, B>(f: (a: A) => ArrayOption<B>) => (ma: ArrayOption<A>) => ArrayOption<A>, flatten: <A>(mma: ArrayOption<ArrayOption<A>>) => ArrayOption<A>, map: <A, B>(f: (a: A) => B) => (fa: ArrayOption<A>) => ArrayOption<B>;
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -6,2 +6,4 @@ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';

* You can use `Array.chunksOf` to provide the `as` argument.
*
* @since 0.1.0
*/

@@ -8,0 +10,0 @@ export declare function batchTraverse<M extends URIS3>(M: Monad3<M>): <U, L, A, B>(as: Array<Array<A>>, f: (a: A) => Kind3<M, U, L, B>) => Kind3<M, U, L, Array<B>>;

import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';
import { Monad, Monad1, Monad2, Monad2C, Monad3 } from 'fp-ts/lib/Monad';
declare type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
/**
* @since 0.1.0
*/
export interface Do3<M extends URIS3, S extends object> {

@@ -26,2 +29,5 @@ do: <U, L>(ma: Kind3<M, U, L, unknown>) => Do3C<M, S, U, L>;

}
/**
* @since 0.1.0
*/
export interface Do3C<M extends URIS3, S extends object, U, L> {

@@ -49,2 +55,5 @@ do: (ma: Kind3<M, U, L, unknown>) => Do3C<M, S, U, L>;

}
/**
* @since 0.1.0
*/
export interface Do2<M extends URIS2, S extends object> {

@@ -72,2 +81,5 @@ do: <L>(ma: Kind2<M, L, unknown>) => Do2C<M, S, L>;

}
/**
* @since 0.1.0
*/
export interface Do2C<M extends URIS2, S extends object, L> {

@@ -95,2 +107,5 @@ do: (ma: Kind2<M, L, unknown>) => Do2C<M, S, L>;

}
/**
* @since 0.1.0
*/
export interface Do1<M extends URIS, S extends object> {

@@ -118,2 +133,5 @@ do: (ma: Kind<M, unknown>) => Do1<M, S>;

}
/**
* @since 0.1.0
*/
export interface Do0<M, S extends object> {

@@ -142,3 +160,3 @@ do: (ma: HKT<M, unknown>) => Do0<M, S>;

/**
* This function provides a simuation of Haskell do notation. The `bind` / `bindL` functions contributes to a threaded
* This function provides a simulation of Haskell do notation. The `bind` / `bindL` functions contributes to a threaded
* scope that is available to each subsequent step. The `do` / `doL` functions can be used to perform computations that

@@ -145,0 +163,0 @@ * add nothing to the scope. The `return` function lifts the given callback to the monad context. Finally the `done`

@@ -53,2 +53,30 @@ import * as I from 'fp-ts/lib/IO';

declare const ap: <E, A>(fa: ReaderIO<E, A>) => <B>(fab: ReaderIO<E, (a: A) => B>) => ReaderIO<E, B>, apFirst: <E, B>(fb: ReaderIO<E, B>) => <A>(fa: ReaderIO<E, A>) => ReaderIO<E, A>, apSecond: <e, B>(fb: ReaderIO<e, B>) => <A>(fa: ReaderIO<e, A>) => ReaderIO<e, B>, chain: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, B>, chainFirst: <E, A, B>(f: (a: A) => ReaderIO<E, B>) => (ma: ReaderIO<E, A>) => ReaderIO<E, A>, flatten: <E, A>(mma: ReaderIO<E, ReaderIO<E, A>>) => ReaderIO<E, A>, map: <A, B>(f: (a: A) => B) => <E>(fa: ReaderIO<E, A>) => ReaderIO<E, B>;
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -21,3 +21,3 @@ /**

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -29,3 +29,3 @@ export interface Semialign<F> extends Functor<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -37,3 +37,3 @@ export interface Semialign1<F extends URIS> extends Functor1<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -45,3 +45,3 @@ export interface Semialign2<F extends URIS2> extends Functor2<F> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -53,3 +53,3 @@ export interface Semialign2C<F extends URIS2, L> extends Functor2C<F, L> {

/**
* @since 0.3.0
* @since 0.1.0
*/

@@ -56,0 +56,0 @@ export interface Semialign3<F extends URIS3> extends Functor3<F> {

@@ -6,4 +6,4 @@ import { URI } from 'fp-ts/lib/NonEmptyArray';

*
* @since 0.0.3
* @since 0.1.0
*/
export declare const semialignNonEmptyArray: Semialign1<URI>;

@@ -9,3 +9,3 @@ "use strict";

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -30,3 +30,3 @@ exports.semialignNonEmptyArray = {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -48,3 +48,3 @@ alignWith: function (fa, fb, f) {

*
* @since 0.0.3
* @since 0.1.0
*/

@@ -51,0 +51,0 @@ align: function (fa, fb) {

@@ -65,2 +65,30 @@ import * as I from 'fp-ts/lib/IO';

declare const ap: <E, A>(fa: StateIO<E, A>) => <B>(fab: StateIO<E, (a: A) => B>) => StateIO<E, B>, apFirst: <E, B>(fb: StateIO<E, B>) => <A>(fa: StateIO<E, A>) => StateIO<E, A>, apSecond: <e, B>(fb: StateIO<e, B>) => <A>(fa: StateIO<e, A>) => StateIO<e, B>, chain: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, B>, chainFirst: <E, A, B>(f: (a: A) => StateIO<E, B>) => (ma: StateIO<E, A>) => StateIO<E, A>, flatten: <E, A>(mma: StateIO<E, StateIO<E, A>>) => StateIO<E, A>, map: <A, B>(f: (a: A) => B) => <E>(fa: StateIO<E, A>) => StateIO<E, B>;
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -113,2 +113,46 @@ import { Either } from 'fp-ts/lib/Either';

};
export { ap, apFirst, apSecond, chain, chainFirst, flatten, map, filterOrElse, fromEither, fromOption, fromPredicate };
export {
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map,
/**
* @since 0.1.0
*/
filterOrElse,
/**
* @since 0.1.0
*/
fromEither,
/**
* @since 0.1.0
*/
fromOption,
/**
* @since 0.1.0
*/
fromPredicate };

@@ -52,2 +52,34 @@ import { Alt1 } from 'fp-ts/lib/Alt';

declare const alt: <A>(that: () => TaskOption<A>) => (fa: TaskOption<A>) => TaskOption<A>, ap: <A>(fa: TaskOption<A>) => <B>(fab: TaskOption<(a: A) => B>) => TaskOption<B>, apFirst: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<A>, apSecond: <B>(fb: TaskOption<B>) => <A>(fa: TaskOption<A>) => TaskOption<B>, chain: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<B>, chainFirst: <A, B>(f: (a: A) => TaskOption<B>) => (ma: TaskOption<A>) => TaskOption<A>, flatten: <A>(mma: TaskOption<TaskOption<A>>) => TaskOption<A>, map: <A, B>(f: (a: A) => B) => (fa: TaskOption<A>) => TaskOption<B>;
export { alt, ap, apFirst, apSecond, chain, chainFirst, flatten, map };
export {
/**
* @since 0.1.0
*/
alt,
/**
* @since 0.1.0
*/
ap,
/**
* @since 0.1.0
*/
apFirst,
/**
* @since 0.1.0
*/
apSecond,
/**
* @since 0.1.0
*/
chain,
/**
* @since 0.1.0
*/
chainFirst,
/**
* @since 0.1.0
*/
flatten,
/**
* @since 0.1.0
*/
map };

@@ -20,3 +20,3 @@ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from 'fp-ts/lib/HKT';

*
* @since 0.0.1
* @since 0.1.0
*/

@@ -23,0 +23,0 @@ export declare function time<M extends URIS3>(M: MonadIO3<M>): <U, L, A>(ma: Kind3<M, U, L, A>) => Kind3<M, U, L, [A, number]>;

{
"name": "fp-ts-contrib",
"version": "0.1.2",
"version": "0.1.3",
"description": "A community driven utility package for fp-ts",

@@ -45,11 +45,11 @@ "files": [

"benchmark": "^2.1.4",
"docs-ts": "0.0.1",
"docs-ts": "^0.2.1",
"doctoc": "^1.4.0",
"dtslint": "github:gcanti/dtslint",
"fp-ts": "^2.0.0",
"jest": "^23.6.0",
"jest": "^24.8.0",
"mocha": "^5.2.0",
"prettier": "^1.16.4",
"rimraf": "^2.6.3",
"ts-jest": "^23.10.5",
"ts-jest": "^24.0.2",
"ts-node": "^8.0.2",

@@ -56,0 +56,0 @@ "tslint": "^5.12.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc