Skip to content

unctionjs/mapValues

Repository files navigation

@unction/mapValues

Tests Stability Dependencies

MapperFunctionType<A, B> => Array<A> | Set<A> | Record<string | number | symbol, B> | Map<B, A> | string => Array<B> | Set<B> | Record<string | number | symbol, unknown> | Map<B, unknown> | string

A pretty standard mapValues(), but with enforced unary currying.

mapValues(
  (value) => value + 1
)(
  [1, 2, 3]
)

Which will return:

[2, 3, 4]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published