0.3.2 • Published 26 days ago

monadojs v0.3.2

Weekly downloads
-
License
ISC
Repository
github
Last release
26 days ago

MonadoJs

This library allow developper to do some common operations on arrays and objects (filtering, mapping, reducing and sorting). The idea came when i've wanted to do sum on nested properties of object, and having to declare intermediate variables and calling popular libraries helper functions to do what i wanted. Also i wanted to have the ability to use the functions from the library with common js functions (like filter, reducer, map...) without the need to always use the pipe functions like in other libraries.

Getting started

To install just run

# npm
npm install monadojs
# yarn
yarn add monadojs

API

Filters

  • empty
  • endsWith
  • eq
  • gt
  • gte
  • includes
  • lt
  • lte
  • match
  • neq
  • nil
  • ofType
  • startsWith
  • unique

Logical Operators

Logical operators are function that can be used in combination with filter operator.

  • and
  • nand
  • nor
  • not
  • or
  • xor

Mapper

  • capitalize
  • ceil
  • divide
  • floor
  • lower
  • match-with
  • minus
  • modulo
  • plus
  • pow
  • prop
  • range
  • replace
  • round
  • substring
  • times
  • transform
  • upper

Operators

Operators are functions that can be applyed on both object or array.

Projections

Projections are a combination of operator and mapper at the same time. It can handle arrays or object at the same time and produce a value.

  • exclude
  • pick

Reducers

Reducers are function that produce a single result by iterating over the passed array.

  • avg
  • chunk
  • first
  • flatten
  • group
  • head
  • join
  • last
  • max
  • min
  • nth
  • sample
  • slice
  • sum
  • tail
  • zip

Sorters

  • asFirst
  • asLast
  • asc
  • desc
0.3.3-0

26 days ago

0.3.0

1 month ago

0.3.2

1 month ago

0.2.0

2 months ago

0.1.1

3 months ago

0.1.0

3 months ago

0.0.26

9 months ago

0.3.1

12 months ago

0.0.20

11 months ago

0.0.21

10 months ago

0.0.22

10 months ago

0.0.23

10 months ago

0.0.24

10 months ago

0.0.25

9 months ago

0.0.18

11 months ago

0.0.19

11 months ago

0.0.18-0

1 year ago

0.0.5-rc.12

1 year ago

0.0.5-rc.13

1 year ago

0.0.5-rc.14

1 year ago

0.0.5-rc.15

1 year ago

0.0.5-rc.16

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.17

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5-rc.9

1 year ago

0.0.0-rc.8

1 year ago

0.0.5-rc.10

1 year ago

0.0.5-rc.11

1 year ago

0.0.5-rc.8

1 year ago

0.0.5-rc.7

1 year ago

0.0.5-rc.6

1 year ago

0.0.5-rc.5

2 years ago

0.0.5-rc.4

2 years ago

0.0.5-rc.3

2 years ago

0.0.5-rc.2

2 years ago

0.0.5-rc.1

2 years ago

0.0.5-rc.0

2 years ago

0.0.5-beta.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago