@everlast-brands/utility-functions
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Utility Functions

Set of agnostic utility functions to work with arrays, dates, numbers, and strings.

btoa() Encode string to base64 atob() Decode base 64 string decodeEntities() Decode common HTML Entities formatDate() Formates a unix or js epoch date number formatDateFull() Formats a unix or js epoch date number to mm/dd/yyyy formatDatePartial() Formates a unix or js epoch date number formatDateTime() Formates a unix or js epoch date number convertHTMLDate() parse html date to js date formatEnum() convert THIS_AND_THIS to "This and this" formatMacroCase() convert THIS_AND_THIS to "This And This" formatMoney() convert this 1000 to $1,000.00 formatPhone() convert this 1234567890 to 123-456-7890 formatPhoneSimple() conver this 1234567890 to (123) 456-7890 generateKey() Create a random string getItemById() pull an object from an array by the object id property mergeArraysNoDuplicates() merge arrays together removing duplicates propSort() sort an array of objects by a particular object property nestedPropSort() sort an array of objects by a particular nested property slugify() takes a string and normalizes it for a url slug

Readme

Keywords

Package Sidebar

Install

npm i @everlast-brands/utility-functions

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

16.2 kB

Total Files

31

Last publish

Collaborators

  • eb_dev