Skip to content

Latest commit

 

History

History

utils

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@samuel-lewis/utils

A collection of various Javascript utilities.

Array

  • divide: Divides an array into two parts based on a given predicate
  • split: Given two arrays, finds their unique and intersecting values

Slug

  • toSlug: toSlug converts a string to a url safe slug
  • toUniqueSlug: toUniqueSlug does the same as toSlug, with addition of a unique ID

Time

  • seconds: Converts seconds to milliseconds
  • minutes: Converts minutes to milliseconds
  • hours: Converts hours to milliseconds
  • days: Converts days to milliseconds