Tables d'équivalence entre bibliothèques
Ce document fournit des tables de comparaison entre les modules Pithos et leurs équivalents dans les bibliothèques populaires. Les comparaisons sont organisées en trois catégories :
- Utilitaires : Fonctions utilitaires générales (Lodash, Es-toolkit, Remeda, Radashi, Ramda)
- Validation : Bibliothèques de validation de schémas (Zod, Valibot, ArkType, Yup)
- Gestion d'erreurs : Patterns fonctionnels de gestion d'erreurs (neverthrow, fp-ts, Effect, ts-results)
Les équivalences listées ici sont indicatives uniquement et ne garantissent pas la compatibilité ou l'interchangeabilité entre les bibliothèques. Chaque bibliothèque a sa propre philosophie de conception, ses signatures de fonctions et ses comportements dans les cas limites.
Consultez toujours la documentation de chaque fonction avant de migrer du code.
Pithos ne vise pas à couvrir 100% des utilitaires de chaque bibliothèque. Certaines fonctions ne seront jamais ajoutées, notamment :
- Les fonctions ayant un équivalent natif récent en JavaScript/TypeScript
- Les fonctions mutables (Pithos favorise l'immutabilité)
- Les fonctions considérées trop spécifiques ou rarement utilisées
- Les patterns FP avancés de Ramda (lenses, transducers, applicatives, etc.) : pour ceux-ci, utilisez directement Ramda ou fp-ts
Légende
= Disponible dans Pithos
= Non disponible dans Pithos-= Non disponible dans cette bibliothèque≈= Équivalent approximatif (API/comportement similaire mais non identique)
Partie 1 : Utilitaires
Comparaison entre Pithos (Arkhe) et les bibliothèques utilitaires : Lodash, Es-toolkit, Remeda, Radashi et Ramda.
Array
| Pithos | Lodash | ES-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
chunk | ![]() | _.chunk | chunk | chunk | cluster | splitEvery |
countBy | ![]() | _.countBy | countBy | countBy | counting | countBy |
difference | ![]() | _.difference | difference | difference | diff | difference |
drop | ![]() | _.drop | drop | drop | - | drop |
dropRight | ![]() | _.dropRight | dropRight | dropLast | - | dropLast |
dropRightWhile | ![]() | _.dropRightWhile | dropRightWhile | dropLastWhile | - | dropLastWhile |
dropWhile | ![]() | _.dropWhile | dropWhile | dropWhile | - | dropWhile |
each | ![]() | _.forEach | forEach | forEach | - | forEach |
fill | ![]() | _.fill | fill | - | - | - |
filter | ![]() | _.filter | filter | filter | - | filter |
findBest | ![]() | - | - | ≈firstBy | boil | - |
findLast | ![]() | _.findLast | findLast | findLast | - | findLast |
findLastIndex | ![]() | _.findLastIndex | findLastIndex | findLastIndex | - | findLastIndex |
flatMap | ![]() | _.flatMap | flatMap | flatMap | - | chain |
flatMapDeep | ![]() | _.flatMapDeep | flatMapDeep | - | - | - |
groupBy | ![]() | _.groupBy | groupBy | groupBy | group | groupBy |
includes | ![]() | _.includes | includes | - | - | includes |
intersection | ![]() | _.intersection | intersection | intersection | intersects | intersection |
keyBy | ![]() | _.keyBy | keyBy | indexBy | objectify | indexBy |
maxBy | ![]() | _.maxBy | maxBy | - | max | maxBy |
minBy | ![]() | _.minBy | minBy | - | min | minBy |
orderBy | ![]() | _.orderBy | orderBy | sortBy | sort | sortWith |
partition | ![]() | _.partition | partition | partition | fork | partition |
reduce | ![]() | _.reduce | reduce | reduce | - | reduce |
reduceRight | ![]() | _.reduceRight | reduceRight | - | - | reduceRight |
reject | ![]() | _.reject | reject | - | - | reject |
reverse | ![]() | _.reverse | reverse | reverse | - | reverse |
sample | ![]() | _.sample | sample | sample | draw | - |
sampleSize | ![]() | _.sampleSize | sampleSize | sample | - | - |
shuffle | ![]() | _.shuffle | shuffle | shuffle | shuffle | - |
size | ![]() | _.size | size | length | - | length |
sortBy | ![]() | _.sortBy | sortBy | sortBy | sort | sortBy |
take | ![]() | _.take | take | take | - | take |
takeRight | ![]() | _.takeRight | takeRight | takeLast | - | takeLast |
takeRightWhile | ![]() | _.takeRightWhile | takeRightWhile | takeLastWhile | - | takeLastWhile |
takeWhile | ![]() | _.takeWhile | takeWhile | takeWhile | - | takeWhile |
union | ![]() | _.union | union | - | unique | union |
uniq | ![]() | _.uniq | uniq | unique | unique | uniq |
uniqBy | ![]() | _.uniqBy | uniqBy | uniqueBy | unique | uniqBy |
unzip | ![]() | _.unzip | unzip | - | unzip | transpose |
window | ![]() | - | windowed | - | - | aperture |
xor / toggle | ![]() | _.xor | xor | - | toggle | symmetricDifference |
zip | ![]() | _.zip | zip | zip | zip | zip |
zipWith | ![]() | _.zipWith | zipWith | zipWith | zip | zipWith |
| - | ![]() | - | - | dropFirstBy | - | - |
| - | ![]() | - | - | hasAtLeast | - | - |
| - | ![]() | - | - | splitAt | - | splitAt |
| - | ![]() | - | - | splitWhen | - | splitWhen |
| - | ![]() | - | - | takeFirstBy | - | - |
| - | ![]() | - | - | - | - | dropRepeats |
| - | ![]() | - | - | - | - | dropRepeatsWith |
| - | ![]() | - | - | - | - | splitEvery |
| - | ![]() | _.xorBy | xorBy | - | - | - |
| - | ![]() | _.xorWith | xorWith | - | - | symmetricDifferenceWith |
Function
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
after | ![]() | _.after | after | - | - | - |
before | ![]() | _.before | before | - | - | - |
castComparator | ![]() | - | - | - | castComparator | comparator |
castMapping | ![]() | _.iteratee | - | - | castMapping | - |
constant | ![]() | _.constant | constant | constant | - | always |
curry | ![]() | _.curry | curry | - | - | curry |
debounce | ![]() | _.debounce | debounce | debounce | debounce | - |
flip | ![]() | _.flip | flip | - | flip | flip |
flow / pipe | ![]() | _.flow | flow | pipe | chain | pipe |
flowRight | ![]() | _.flowRight | flowRight | - | compose | compose |
identity | ![]() | _.identity | identity | identity | identity | identity |
memoize | ![]() | _.memoize | memoize | - | memo | memoizeWith |
negate | ![]() | _.negate | negate | - | - | complement |
noop | ![]() | _.noop | noop | doNothing | noop | - |
once | ![]() | _.once | once | once | once | once |
tap | ![]() | _.tap | - | tap | - | tap |
throttle | ![]() | _.throttle | throttle | - | throttle | - |
times | ![]() | _.times | times | times | iterate | times |
| - | ![]() | - | - | - | - | ascend |
| - | ![]() | - | - | - | - | descend |
Lang (Vérifications de types)
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
castArray / toArray | ![]() | _.castArray | castArray | - | castArray | - |
cloneDeep / deepClone | ![]() | _.cloneDeep | cloneDeep | clone | cloneDeep | clone |
isArray | ![]() | _.isArray | isArray | isArray | isArray | is(Array) |
isBigint | ![]() | - | - | isBigInt | isBigInt | - |
isBoolean | ![]() | _.isBoolean | isBoolean | isBoolean | isBoolean | is(Boolean) |
isDate | ![]() | _.isDate | isDate | isDate | isDate | is(Date) |
isDefined | ![]() | - | - | isDefined | - | - |
isEmpty | ![]() | _.isEmpty | isEmpty | isEmpty | isEmpty | isEmpty |
isEqual | ![]() | _.isEqual | isEqual | isDeepEqual | isEqual | equals |
isError | ![]() | _.isError | isError | isError | isError | - |
isFloat | ![]() | - | - | - | isFloat | - |
isFunction | ![]() | _.isFunction | isFunction | isFunction | isFunction | is(Function) |
isMap | ![]() | _.isMap | isMap | - | isMap | is(Map) |
isNil | ![]() | _.isNil | isNil | isNullish | isNullish | isNil |
isNonNull | ![]() | - | - | isNonNull | - | isNotNil |
isNonNullable | ![]() | - | - | isNonNullish | - | isNotNil |
isNonUndefined | ![]() | - | - | isDefined | - | - |
isNull | ![]() | _.isNull | isNull | - | - | - |
isNumber | ![]() | _.isNumber | isNumber | isNumber | isNumber | is(Number) |
isObject | ![]() | _.isObject | isObject | isObjectType | isObject | is(Object) |
isOneOf | ![]() | - | - | isIncludedIn | - | - |
isPlainObject | ![]() | _.isPlainObject | isPlainObject | isPlainObject | isPlainObject | - |
isPrimitive | ![]() | - | isPrimitive | - | isPrimitive | - |
isPromise | ![]() | - | isPromise | isPromise | isPromise | - |
isRegExp | ![]() | _.isRegExp | isRegExp | - | isRegExp | is(RegExp) |
isSet | ![]() | _.isSet | isSet | - | isSet | is(Set) |
isString | ![]() | _.isString | isString | isString | isString | is(String) |
isUndefined | ![]() | _.isUndefined | isUndefined | - | isUndefined | - |
| - | ![]() | - | - | isEmptyish | - | - |
| - | ![]() | - | - | isNot | - | - |
| - | ![]() | - | - | isShallowEqual | - | - |
| - | ![]() | - | - | isStrictEqual | - | - |
| - | ![]() | - | - | isTruthy | - | - |
| - | ![]() | - | - | - | - | identical |
| - | ![]() | - | - | - | - | type |
| - | ![]() | _.clone | clone | - | clone | clone |
| - | ![]() | _.cloneDeepWith | cloneDeepWith | - | - | - |
| - | ![]() | _.isEqualWith | isEqualWith | - | - | - |
| - | ![]() | _.isLength | isLength | - | - | - |
| - | ![]() | - | - | - | - | isNotEmpty |
Math / Nombre
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
average | ![]() | _.mean | mean | mean | - | mean |
clamp | ![]() | _.clamp | clamp | clamp | clamp | clamp |
inRange | ![]() | _.inRange | inRange | - | inRange | - |
maxBy | ![]() | _.maxBy | maxBy | - | max | maxBy |
median | ![]() | - | median | median | - | median |
minBy | ![]() | _.minBy | minBy | - | min | minBy |
random | ![]() | _.random | random | randomInteger | random | - |
range | ![]() | _.range | range | range | range | range |
sum | ![]() | _.sum | sum | sum | sum | sum |
| - | ![]() | - | - | product | - | product |
| - | ![]() | _.sumBy | sumBy | sumBy | - | - |
| - | ![]() | _.meanBy | meanBy | meanBy | - | - |
| - | ![]() | - | medianBy | - | - | - |
| - | ![]() | _.rangeRight | rangeRight | - | - | - |
Object
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
defaults | ![]() | _.defaults | defaults | - | - | mergeLeft |
defaultsDeep | ![]() | _.defaultsDeep | defaultsDeep | - | - | mergeDeepLeft |
deepClone | ![]() | _.cloneDeep | cloneDeep | clone | cloneDeep | clone |
evolve | ![]() | - | - | evolve | - | evolve |
findKey | ![]() | _.findKey | findKey | - | - | - |
get | ![]() | _.get | get | pathOr / prop | get | path |
has | ![]() | _.has | has | - | - | has |
invert | ![]() | _.invert | invert | invert | invert | invert |
mapKeys | ![]() | _.mapKeys | mapKeys | mapKeys | mapKeys | mapKeys |
mapValues | ![]() | _.mapValues | mapValues | mapValues | mapValues | mapObjIndexed |
mergeDeep | ![]() | _.merge | merge | mergeDeep | - | mergeDeepRight |
omit | ![]() | _.omit | omit | omit | omit | omit |
omitBy | ![]() | _.omitBy | omitBy | omitBy | filterKey | - |
pick | ![]() | _.pick | pick | pick | pick | pick |
pickBy | ![]() | _.pickBy | pickBy | pickBy | filterKey | pickBy |
set | ![]() | _.set | set | set / setPath | set | assocPath |
| - | ![]() | - | - | mergeAll | - | mergeAll |
| - | ![]() | - | - | - | - | dissoc |
| - | ![]() | - | - | - | - | dissocPath |
| - | ![]() | - | - | - | - | pathOr |
| - | ![]() | - | - | - | - | propOr |
| - | ![]() | - | - | - | - | hasPath |
| - | ![]() | - | - | - | - | renameKeys |
| - | ![]() | _.clone | clone | - | clone | clone |
String
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
camelCase | ![]() | _.camelCase | camelCase | toCamelCase | camel | - |
capitalize | ![]() | _.capitalize | capitalize | capitalize | capitalize | - |
constantCase | ![]() | - | constantCase | - | - | - |
deburr | ![]() | _.deburr | deburr | - | - | - |
escape | ![]() | _.escape | escape | - | escapeHTML | - |
escapeRegExp | ![]() | _.escapeRegExp | escapeRegExp | - | - | - |
kebabCase | ![]() | _.kebabCase | kebabCase | toKebabCase | dash | - |
lowerFirst | ![]() | _.lowerFirst | lowerFirst | uncapitalize | - | - |
pascalCase | ![]() | - | pascalCase | - | pascal | - |
sentenceCase | ![]() | - | - | - | - | - |
snakeCase | ![]() | _.snakeCase | snakeCase | toSnakeCase | snake | - |
template | ![]() | _.template | template | - | template | - |
titleCase | ![]() | - | - | toTitleCase | title | - |
truncate | ![]() | _.truncate | truncate | truncate | - | - |
unescape | ![]() | _.unescape | unescape | - | - | - |
words | ![]() | _.words | words | - | - | - |
| - | ![]() | - | - | randomString | - | - |
| - | ![]() | _.startCase | startCase | - | - | - |
Async / Promise
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
all | ![]() | - | - | - | all | - |
dedupeByKey | ![]() | - | - | - | - | - |
guard | ![]() | - | - | - | guard | - |
parallel | ![]() | - | - | - | parallel | - |
queueByKey | ![]() | - | - | - | queueByKey | - |
retry | ![]() | - | retry | - | retry | - |
sleep | ![]() | _.delay | delay | - | sleep | - |
timeout | ![]() | - | timeout | - | timeout | - |
tryCatch | ![]() | _.attempt | attempt | - | tryit | tryCatch |
| - | ![]() | - | withTimeout | - | - | - |
Util
| Pithos | Lodash | Es-toolkit | Remeda | Radashi | Ramda | |
|---|---|---|---|---|---|---|
assert | ![]() | - | assert | - | assert | - |
castMapping | ![]() | _.iteratee | - | - | castMapping | - |
defaultTo | ![]() | _.defaultTo | defaultTo | defaultTo | - | defaultTo |
noop | ![]() | _.noop | noop | doNothing | noop | - |
range | ![]() | _.range | range | range | range | range |
times | ![]() | _.times | times | times | iterate | times |
uniqueId | ![]() | _.uniqueId | uniqueId | - | uid | - |
| - | ![]() | - | - | sortedIndex | - | - |
| - | ![]() | - | - | sortedIndexBy | - | - |
| - | ![]() | - | - | sortedIndexWith | - | - |
| - | ![]() | - | - | sortedLastIndex | - | - |
| - | ![]() | - | - | sortedLastIndexBy | - | - |
| - | ![]() | _.attempt | attempt | - | tryit | - |
| - | ![]() | - | invariant | - | - | - |
Partie 2 : Validation
Comparaison entre Pithos (Kanon) et les bibliothèques de validation de schémas : Zod, Valibot, ArkType et Yup.
Kanon est le module de validation de Pithos, conçu pour un tree-shaking maximal et une taille de bundle minimale. Contrairement aux validateurs basés sur des classes, Kanon utilise des fonctions pures qui peuvent être importées individuellement.
| Pithos (Kanon) | Zod | Valibot | ArkType | Yup | |
|---|---|---|---|---|---|
string | ![]() | z.string() | v.string() | type("string") | yup.string() |
number | ![]() | z.number() | v.number() | type("number") | yup.number() |
boolean | ![]() | z.boolean() | v.boolean() | type("boolean") | yup.boolean() |
bigint | ![]() | z.bigint() | v.bigint() | type("bigint") | - |
date | ![]() | z.date() | v.date() | type("Date") | yup.date() |
symbol | ![]() | z.symbol() | v.symbol() | type("symbol") | - |
undefined | ![]() | z.undefined() | v.undefined() | type("undefined") | - |
null | ![]() | z.null() | v.null() | type("null") | - |
void | ![]() | z.void() | v.void() | type("void") | - |
any | ![]() | z.any() | v.any() | type("unknown") | yup.mixed() |
unknown | ![]() | z.unknown() | v.unknown() | type("unknown") | yup.mixed() |
never | ![]() | z.never() | v.never() | type("never") | - |
literal | ![]() | z.literal() | v.literal() | type("'value'") | - |
object | ![]() | z.object() | v.object() | type({}) | yup.object() |
array | ![]() | z.array() | v.array() | type("T[]") | yup.array() |
tuple | ![]() | z.tuple() | v.tuple() | type(["T", "U"]) | yup.tuple() |
union | ![]() | z.union() | v.union() | type("T|U") | - |
discriminatedUnion | ![]() | z.discriminatedUnion() | v.variant() | - | - |
intersection | ![]() | z.intersection() | v.intersect() | type("T&U") | - |
record | ![]() | z.record() | v.record() | type("Record<K,V>") | - |
map | ![]() | z.map() | v.map() | - | - |
set | ![]() | z.set() | v.set() | - | - |
enum | ![]() | z.enum() | v.enum() | type("'a'|'b'") | - |
nativeEnum | ![]() | z.nativeEnum() | v.enum() | - | - |
optional | ![]() | .optional() | v.optional() | type("T?") | .optional() |
nullable | ![]() | .nullable() | v.nullable() | type("T|null") | .nullable() |
nullish | ![]() | .nullish() | v.nullish() | - | - |
default | ![]() | .default() | v.optional(_, default) | - | .default() |
catch | ![]() | .catch() | v.fallback() | - | - |
transform | ![]() | .transform() | v.transform() | .pipe() | .transform() |
refine | ![]() | .refine() | v.check() | .narrow() | .test() |
superRefine | ![]() | .superRefine() | v.rawCheck() | - | - |
pipe | ![]() | .pipe() | v.pipe() | .pipe() | - |
coerce | ![]() | z.coerce.* | v.pipe(v.unknown(), v.transform()) | - | - |
parse | ![]() | .parse() | v.parse() | type() | .validateSync() |
safeParse | ![]() | .safeParse() | v.safeParse() | - | - |
parseAsync | ![]() | .parseAsync() | v.parseAsync() | - | .validate() |
safeParseAsync | ![]() | .safeParseAsync() | v.safeParseAsync() | - | - |
brand | ![]() | .brand() | v.brand() | - | - |
readonly | ![]() | .readonly() | v.readonly() | - | - |
lazy | ![]() | z.lazy() | v.lazy() | - | yup.lazy() |
promise | ![]() | z.promise() | - | - | - |
function | ![]() | z.function() | v.function() | - | - |
instanceof | ![]() | z.instanceof() | v.instance() | type("instanceof X") | - |
preprocess | ![]() | z.preprocess() | v.pipe() | - | - |
custom | ![]() | z.custom() | v.custom() | - | - |
Partie 3 : Gestion d'erreurs
Comparaison entre Pithos (Zygos) et les bibliothèques fonctionnelles de gestion d'erreurs : neverthrow, fp-ts, Effect et ts-results.
Effect est un écosystème complet de programmation fonctionnelle, pas seulement une bibliothèque de gestion d'erreurs. Il inclut son propre runtime, l'injection de dépendances, des primitives de concurrence, et bien plus. Nous ne comparons ici que les primitives de gestion d'erreurs (Option, Either, Effect).
Option / Maybe
| Pithos (Zygos) | fp-ts | Effect | neverthrow | ts-results | |
|---|---|---|---|---|---|
Option<A> | ![]() | Option<A> | Option<A> | - | Option<T> |
Some<A> | ![]() | Some<A> | Some<A> | - | Some<T> |
None | ![]() | None | None | - | None |
some(a) | ![]() | O.some(a) | Option.some(a) | - | Some(a) |
none | ![]() | O.none | Option.none() | - | None |
isSome | ![]() | O.isSome | Option.isSome | - | .some |
isNone | ![]() | O.isNone | Option.isNone | - | .none |
fromNullable | ![]() | O.fromNullable | Option.fromNullable | - | - |
fromPredicate | ![]() | O.fromPredicate | Option.filter | - | - |
map | ![]() | O.map | Option.map | - | .map() |
flatMap / chain | ![]() | O.flatMap / O.chain | Option.flatMap | - | .andThen() |
match / fold | ![]() | O.match / O.fold | Option.match | - | .match() |
getOrElse | ![]() | O.getOrElse | Option.getOrElse | - | .unwrapOr() |
orElse / alt | ![]() | O.orElse / O.alt | Option.orElse | - | .or() |
filter | ![]() | O.filter | Option.filter | - | - |
toNullable | ![]() | O.toNullable | Option.getOrNull | - | - |
toUndefined | ![]() | O.toUndefined | Option.getOrUndefined | - | - |
flatten | ![]() | O.flatten | Option.flatten | - | - |
tryCatch | ![]() | O.tryCatch | Option.liftThrowable | - | - |
Either / Result
| Pithos (Zygos) | fp-ts | Effect | neverthrow | ts-results | |
|---|---|---|---|---|---|
Either<E, A> | ![]() | Either<E, A> | Either<L, R> | - | - |
Result<T, E> | ![]() | - | Exit<A, E> | Result<T, E> | Result<T, E> |
Left<E> / Err | ![]() | Left<E> | Either.left | Err<E> | Err<E> |
Right<A> / Ok | ![]() | Right<A> | Either.right | Ok<T> | Ok<T> |
left(e) / err(e) | ![]() | E.left(e) | Either.left(e) | err(e) | Err(e) |
right(a) / ok(a) | ![]() | E.right(a) | Either.right(a) | ok(a) | Ok(a) |
isLeft / isErr | ![]() | E.isLeft | Either.isLeft | .isErr() | .err |
isRight / isOk | ![]() | E.isRight | Either.isRight | .isOk() | .ok |
map | ![]() | E.map | Either.map | .map() | .map() |
mapLeft / mapErr | ![]() | E.mapLeft | Either.mapLeft | .mapErr() | .mapErr() |
flatMap / andThen | ![]() | E.flatMap / E.chain | Either.flatMap | .andThen() | .andThen() |
match / fold | ![]() | E.match / E.fold | Either.match | .match() | .match() |
getOrElse | ![]() | E.getOrElse | Either.getOrElse | .unwrapOr() | .unwrapOr() |
orElse | ![]() | E.orElse | Either.orElse | .orElse() | .or() |
fromNullable | ![]() | E.fromNullable | - | - | - |
fromPredicate | ![]() | E.fromPredicate | - | - | - |
tryCatch | ![]() | E.tryCatch | Effect.try | Result.fromThrowable | - |
fromOption | ![]() | E.fromOption | - | - | - |
toUnion | ![]() | E.toUnion | Either.merge | - | - |
swap | ![]() | E.swap | Either.flip | - | - |
filterOrElse | ![]() | E.filterOrElse | - | - | - |
Do notation | ![]() | E.Do | Effect.gen | - | - |
bind | ![]() | E.bind | - | - | - |
apS | ![]() | E.apS | - | - | - |
Task / Async
| Pithos (Zygos) | fp-ts | Effect | neverthrow | ts-results | |
|---|---|---|---|---|---|
Task<A> | ![]() | Task<A> | Effect<A> | - | - |
TaskEither<E, A> | ![]() | TaskEither<E, A> | Effect<A, E> | - | - |
ResultAsync<T, E> | ![]() | - | Effect<A, E> | ResultAsync<T, E> | ResultAsync<T, E> |
okAsync(a) | ![]() | TE.right(a) | Effect.succeed(a) | okAsync(a) | - |
errAsync(e) | ![]() | TE.left(e) | Effect.fail(e) | errAsync(e) | - |
fromPromise | ![]() | TE.tryCatch | Effect.tryPromise | ResultAsync.fromPromise | - |
fromSafePromise | ![]() | T.fromIO | Effect.promise | ResultAsync.fromSafePromise | - |
map (async) | ![]() | TE.map | Effect.map | .map() | - |
mapErr (async) | ![]() | TE.mapLeft | Effect.mapError | .mapErr() | - |
andThen (async) | ![]() | TE.flatMap / TE.chain | Effect.flatMap | .andThen() | - |
match (async) | ![]() | TE.match / TE.fold | Effect.match | .match() | - |
unwrapOr (async) | ![]() | TE.getOrElse | Effect.orElseSucceed | .unwrapOr() | - |
combine | ![]() | A.sequence(TE.ApplicativePar) | Effect.all | Result.combine | - |
safeTry | ![]() | - | Effect.gen | safeTry | - |
Comparaisons détaillées
- Arkhe vs Lodash — Taille de bundle — Comparaison de taille par fonction
- Kanon vs Zod — Interopérabilité — Compatibilité fonctionnalité par fonctionnalité
- Zygos vs Neverthrow — Interopérabilité — Détails du remplacement direct
- Vue d'ensemble des comparaisons — Quand utiliser chaque module