Skip to content

Latest commit

 

History

History
274 lines (220 loc) · 3.86 KB

README.md

File metadata and controls

274 lines (220 loc) · 3.86 KB

About

Over the years I have come across many scenarios with data, file system, and web operations that I decided to create a collection of commonly used functions to help with all those mentioned. I used ES6 and class that extend array, + object. Number and strings have prototypes assigned to make object coding more fluid and joy to code with. Type declaration d.ts file included for intellisense

In a Collection We

  • Find
  • Read/analyze
  • Remove
  • Add

Types

  • Array
  • Object
  • Number
  • String

Array/Objects linguistics

The most common array / object linguistics when I'm coding mainly falls into these groups

  • {filterout|filter|get|find|remove|combine}
  • {all|value|index|key} {where|in|with} {value|array|key|index|obj|array}
  • {is|isnot|has|doesnothave|isset|isempty}
  • {duplicate|unique|different|intersection|same|diff}

String/Number linguistics

  • {find|get} {index|key} wherefirstoccurence
  • countalloccurrencesin {array|obj values}
  • issetinobj
  • isin {array|obj}
  • isa {key|value} in {array|obj}
  • insertintoarrayatindex
  • removefromarrayatindex
  • removefromobj | unsetfromobj

Find / Get Where

  • Index
  • Value
  • Object Key
  • Object Value
  • String
  • Number

Calculated Answers

  • Biggest
  • Smallest
  • Last
  • First
  • Average
  • Sum

Bool Answers / Checks

  • Is
  • Is Not
  • Is in
  • Is Not in
  • Has / Contains / Includes / Matches
  • Does Not Have / Does Not Contain
  • Is Set / Exists /is Not Empty/undefined/null
  • Is Empty / is Not Set / Doesnt Exist

Action Functions

  • Merge / Concat
  • Find / Match
  • Combine
  • Remove
  • Copy / Clone
  • Store
  • Replace
  • Reverse
  • Swap

Filters

  • Unique
  • Duplicates
  • With / Append /attach
  • Without / Exclude /filter

Array Funcs

  • Filter
  • Remove
  • Add/push
  • Has / Contains / Includes / Matches
  • Is Set/exists/is Not Empty/undefined/null
  • All Calculated Answers
  • Does Not Have / Does Not Contain
  • Is Empty/is Not Set/doesnt Exist
  • Get Where

Object Funcs

  • Has Key
  • Has Value Where Key is
  • Set

Number Funcs

  • Math
  • Isin

String Funcs

  • Isin
  • Replace
  • Find / Match

Entire Array Funcs

  • Merge With
  • Combine
  • Sort
  • Filter Out All
  • Filter Out Where
  • Get All Where
  • Remove All Where
  • With: a Value/func, Another Array

Entire Obj Funcs

  • Merge With
  • Get All Keys
  • Get All Values
  • With: a Value/func, Another Object

Array + Obj Singular Operations

  • Get / Find
  • Remove / Delete
  • Push / Add
  • Replace / Change
  • Has / Exists
  • Is-empty
  • Is-set
  • Is-in
  • Is
  • Has
  • Get
  • Getwhere
  • Remove
  • Removewhere

Data Manip. Licia Funcs
compact
combine
defaults
find
findkey
findlastidx
invert
intersect
ismatch
has
hashtable
keys
allkeys
format
lazyrequire
matcher
mapobj
omit
pairs
pick
pluck
remove
safedel
safeget
safeset
sortkeys
splitpath
swap
union
values
waterfall
wrap
System Licia Funcs
fs
invariant
isfile
isnode
isrelative
iswindows
kill
lazyrequire
mkdir
normalizepath
once
open
openfile
ordinal
rmdir
root
slugify
splitpath
splitcase
spacecase
through
tryit
waituntil
waterfall
wrap
Scraping Licia
$
$attr
$data
$offset
$property
$remove
$safeels
xpath
fetch
geturlparam
html
isabsoluteurl
isel
ishidden
isurl
linkify
normalizeheader
open
query
ready
selector
slugify
striphtmltag
throttle
debounce
toel
truncate
ramda
foreachobjindexed
invertobj
keys
mapobjindexed
mergeall
pathor
project
values
countby
findindex
indexby
insert