Skip to content

Releases: asd-xiv/m

v1.1.0

23 Oct 16:05
Compare
Choose a tag to compare

1.1.0 (2019-10-23)

Features

  • Change get to return default value if it's explicitly set and the result isNothing (null, undefined, NaN). (2aedfac)

v1.0.1

02 Oct 12:52
Compare
Choose a tag to compare

1.0.1 (2019-10-02)

Bug Fixes

  • Fix "get" egde case where "undefined" is returned for values of "null" or "NaN". (97c5f03)

v1.0.0

01 Oct 14:35
Compare
Choose a tag to compare

1.0.0 (2019-10-01)

Features

  • Update "get" to accept a default value in case path not found (90b0236)

BREAKING CHANGES

Path chain needs to be array. It can also be a single value if accessing a direct property.

//
// Old
//
get("a", "b", "c")({a: {b: {c: "test"}}})
// => "test"

//
// New
//
get(["a", "b", "c"])({a: {b: {c: "test"}}})
// => "test"

This still works:

get("a")({a: {b: "lorem"}})
// => {b: "lorem"}

Added default value in case path does not exist:

get(["a", "b"], "lorem")({a: {c: "ipsum"}})
// => "lorem"

//
// Old
//
pipe(
  get(["a", "b"], "lorem"),
  when(isNothing, same("lorem"))
)({a: {c: "ipsum"}})
// => "lorem"

v0.31.0

27 Sep 13:24
Compare
Choose a tag to compare

0.31.0 (2019-09-27)

Features

  • Add function to flatten nested object (46b832d)
  • Add function to test if value is object (affac85)

v0.30.1

13 Sep 20:14
Compare
Choose a tag to compare

0.30.1 (2019-09-13)

Bug Fixes

  • ci: Change cache key from package.json hash -> git commit (c24a146)

v0.30.0

13 Sep 20:01
Compare
Choose a tag to compare

0.30.0 (2019-09-13)

Features

  • Add "case" function to replicate case statement (fc4c77c)

v0.29.1

13 Sep 14:03
Compare
Choose a tag to compare

0.29.1 (2019-09-13)

Bug Fixes

  • Force npm publish on new org (266ef53)

v0.27.0

13 Sep 12:34
Compare
Choose a tag to compare

0.27.0 (2019-09-13)

Features

  • Add function that always returns the input given (55679cb)
  • Add function to replicate try/catch using a tryer and catcher function (df04abd)

v0.26.0

03 Sep 21:10
Compare
Choose a tag to compare

0.26.0 (2019-09-03)

Features

  • Add isNothing function to test if value is either null, undefined or NaN (3cf4cb6)
  • Add isTrue/isFalse with === (66fe9b4)
  • Add partition function to split an array in two using a predicate function or *With if splitting object array (be5c8ea)

v0.25.0

25 Aug 22:20
Compare
Choose a tag to compare

0.25.0 (2019-08-25)

Features

  • "get" can access nested propeties in arrays and objects (a8549ad)