0.0.5 • Published 4 years ago

@davidcraig/utils v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Utilities

Installation

npm i -D @davidcraig/utils

Helpers

Object

hasProp (obj, prop) - Checks if the property exists on the provided object.

Array

reduceSumByKey (array, key) - Takes an array of objects, and performs reduce (sum) on the values keyed by the provided key on each object.

Misc

hasValue (val) - Checks if the given value is not null and is not undefined