3.1.1 • Published 2 years ago

squid-utils v3.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

squid-utils

Utility functions:

  • BaseError - error object to hold error code and message.
  • nonNull(object, errorObjectSupplier?) Throws NullObjectError if null or undefined. Optionally custom 'errorObjectSupplier' can be passed to be thrown.
  • toNumOrStr(object) Given any object, return number if it is, otherwise return toString() value.
  • keys(mapOrObject) Given map or an object return keys in an array.
  • values(mapOrObject) Given map or an object return values in an array.
  • includesI(collection, searchString) Search the string in the collection ignoring case.
  • getOrSetDefault(map, key, defaultValue) Get value of key in the map. If not pathExists, then set the default value in the map for the key and then return the default value.
  • getOrCall(map, key, callbackFn) Get map value for the key. If not pathExists then call the function. and return its value if any.
3.1.1

2 years ago

3.0.16

3 years ago

3.0.13

3 years ago

3.0.12

3 years ago

3.0.11

4 years ago

3.0.9

4 years ago

3.0.10

4 years ago

3.0.8

4 years ago

3.0.7

4 years ago

3.0.6

4 years ago

3.0.5

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.2.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.2.2

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago