A collection of useful utilities to make development with Deno even easier!
import easy from "https://deno.land/x/easyutil@0.4.0/mod.ts";
The utilities are nested within modules in a way that aids natural language recognition and empowers the developer to drill down and find utilities by harnessing the IDE's intellisense on dot notation. Less looking through documentation and more productivity!
if (easy.string.isA.string(str)) ...
if (easy.string.isA.number(numberStr)) ...
if (easy.string.isA.integer(integerStr)) ...
if (easy.string.isA.boolean(booleanStr)) ...
const num = easy.string.parse.number(str);
const int = easy.string.parse.integer(str);
const bool = easy.string.parse.boolean(str);
const obj = easy.string.parse.urlParams(str);
const trimmed = easy.string.trim.charsBoth(str, ['/', '\\']);
const leftTrimmed = easy.string.trim.charsLeft(str, ['/', '\\']);
const rightTrimmed = easy.string.trim.charsRight(str, ['/', '\\']);
const trimmed = easy.string.trim.wordBoth(str, 'word');
const leftTrimmed = easy.string.trim.wordLeft(str, 'word');
const rightTrimmed = easy.string.trim.wordRight(str, 'word');
easy.sleep(1000);
Run tests with:
$ deno test tests/