1.6.1 • Published 4 days ago

pepka v1.6.1

Weekly downloads
21
License
MIT
Repository
github
Last release
4 days ago

image

HI! Meet pepka - JavaScript/TypeScript functional programming utility library named after my parakeet.

This lib is intended to be a functional toolkit more flexible than ramda is. Its' basic API is similimar to ramda's one. Other goals are:

  • Async pipes. They are very handy, but are not 100% pure in terms of Haskell c:
  • Most flexible types possible (Let'em be any better than crashing because of their failures. I'm currently working on full JSDocs and better basic types).
  • Tree-shakeble and smallest possible. What could be native, is native.
  • Has "quick" alternatives of most computation-heavy functions with q prefix which are not completely safe by fp means: most of them do mutations and it may be needed to clone or cloneShallow data in a first pipe of compose(...).
  • Has basic toolbelt-types like AnyObject and AnyFunc<ReturnType?, ...args?> etc.
  • Has some basic additinal must-have stuff that ramda does not.

Full docs are coming, please reference ramda's ones for most operations and examples: https://ramdajs.com/docs/

Basic API differences:

  • clone() clones deeply as possible any type possible.
  • cloneShallow() clones only by 1st level of folding also any type possible.
  • mergeDeep - replaces arrays.
    • mergeDeepX - replaces its' elements with same indexes.
    • mergeDeepAdd - adds new elements to arrays.
  • type - returns type UpperCased of anything passed to it, including classes and typed arrays.
  • mapKeys - changes existing keys and data by map or function like usual mapper.
  • explore(label)(data) - compose(explore('the number'))(42) results in 'the number', 42 in console passing by the data.
  • genBy(generator(index), length) - generates arrays.
  • sizeof(array or object) - counts indexes of it.
  • Aliases: mirror, reflect, echo = identity.
  • Quicks: qappend, qassoc, qreduce, qmergeDeep, qmergeDeepX, qmergeDeepAdd, qmapKeys, qfilter

Async APIs:

  • composeAsync - waits for a Promise if emitted by a pipe inside it.
  • waitAll = Promise.all
  • forEachAsync - runs a handler with all elements passed in parallel.
  • forEachSerial - waits for a previous handler to resolve if Promise emitted.
1.6.1

4 days ago

1.6.0

11 days ago

1.5.3

13 days ago

1.4.3

14 days ago

1.4.2

15 days ago

1.4.1

15 days ago

1.3.1

18 days ago

1.3.0

18 days ago

1.2.1

23 days ago

1.2.0

26 days ago

1.0.0

1 month ago

1.1.0

1 month ago

1.0.0-beta.10

1 year ago

1.0.0-beta.2

1 year ago

1.0.0-beta.3

1 year ago

1.0.0-beta.4

1 year ago

1.0.0-beta.5

1 year ago

1.0.0-beta.0

1 year ago

1.0.0-beta.1

1 year ago

1.0.0-beta.6

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-beta.8

1 year ago

1.0.0-beta.9

1 year ago

0.13.0-b7

1 year ago

0.13.0-b9

1 year ago

0.13.0-b4

1 year ago

0.13.0-b3

1 year ago

0.13.0-b5

1 year ago

0.13.0-b2

1 year ago

0.13.0-b1

1 year ago

0.13.0-b10

1 year ago

0.14.0-beta10

1 year ago

0.14.0-beta12

1 year ago

0.14.0-beta1

1 year ago

0.14.0-beta0

1 year ago

0.14.0-beta5

1 year ago

0.14.0-beta4

1 year ago

0.14.0-beta3

1 year ago

0.14.0-beta2

1 year ago

0.14.0-beta9

1 year ago

0.14.0-beta8

1 year ago

0.14.0-beta7

1 year ago

0.13.0-beta12

1 year ago

0.13.0-beta10

1 year ago

0.13.0-beta11

1 year ago

0.14.0

1 year ago

0.14.1

1 year ago

0.12.3

3 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.9.6

4 years ago

0.9.5

4 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.13

4 years ago

0.7.12

4 years ago

0.7.11

4 years ago

0.7.10

4 years ago

0.7.9

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.4

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.2-beta.2

4 years ago

0.6.1

4 years ago

0.6.2-beta.1

4 years ago

0.6.0

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago