@sharyn/util

Lodash-like utils.

Usage no npm install needed!

<script type="module">
  import sharynUtil from 'https://cdn.skypack.dev/@sharyn/util';
</script>

README

🌹 @sharyn/util

Lodash-like utils.

Installation

npm i @sharyn/util
# or
yarn add @sharyn/util

You can alternatively install the entire sharyn library or individual modules.

Modules

  • between – Tests if a value is between two bounds
  • cycle – Cycles between multiple values
  • either – Tests equality with multiple values
  • exists – Returns true if not null or undefined
  • global – Functions to create and access global variables
  • ifs – An if, else if, else if... else util
  • inlineThrow – To throw in an expression
  • invoke – A self invoking function util
  • swit – An inline and less verbose switch
  • toggle – Toggles between two values
  • tryCatch – An inline try - catch - finally
  • wait – A Promise-based delay

This package is part of Sharyn, a collection of utilities and helpers.