@onaio/utils

Useful utilities from Ona

Usage no npm install needed!

<script type="module">
  import onaioUtils from 'https://cdn.skypack.dev/@onaio/utils';
</script>

README

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%