npm.io
0.0.1 • Published 6 years ago

@onaio/utils

Licence
Apache-2.0
Version
0.0.1
Deps
0
Size
16 kB
Vulns
0
Weekly
0
Stars
11

Ona Utils

This package is a collection of useful utilities.

What is included

Utility Type Definitions

  • Dictionary: an interface that can describe any object
  • UpdateType: a generic type used to merge one object interface with another
  • Result: a generic type that is meant to describe the result of any function, with in-built error handling.
Utility Functions
  • percentage: a small little function that converts a decimal into a percentage e.g. 0.18 into 18%