Skip to content

A collection of useful utilities to make development with Deno even easier!

Notifications You must be signed in to change notification settings

DavidPesta/easyutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easyutil

A collection of useful utilities to make development with Deno even easier!

Usage

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!

Functions

String "Is A" Checks

if (easy.string.isA.string(str)) ...
if (easy.string.isA.number(numberStr)) ...
if (easy.string.isA.integer(integerStr)) ...
if (easy.string.isA.boolean(booleanStr)) ...

String Parse

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);

String Trim

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');

Sleep

easy.sleep(1000);

Tests

Run tests with:

$ deno test tests/

About

A collection of useful utilities to make development with Deno even easier!

Resources

Stars

Watchers

Forks

Packages

No packages published