Skip to content

Overview

jakenester31 edited this page Aug 5, 2025 · 13 revisions

Global

$(val)

scans the dom list for the first matching element
  • val : an html selector tag to find match a matching element

$$(val)

scans the dom list for all matching elements
  • val : an html selector tag to find match a matching element

Proxy

  • links : an inaccessible, scoped weakmap that only Proxy and Proxy² can access.
  • has(trg) : returns a boolean stating of the target (trg) is a proxy or not
  • targetOf(proxy) : returns a reference to a proxies target or undefined if the object is not a proxy

Proxy²

a proxy placed on the proxy object for recording all existing proxies and checking if something is a proxy
  • construct : calls the standard proxy constructor and records all new proxies & their targets

Object

checkGroup(sign,func)

runs the function (of checks) with the default check value being the inputted sign

– tip : because sign acts as the default, there is no need to input a sign to each check function

  • sigh : the temporary value of check’s default
  • func : a function containing check function(s)

Object.prototype

entrify(name,func) : merges fromEntries and entries together

entrify() : converts an object into a plain object

  • this : object to run function on
  • name : the name of the function being executed, ex. filter or map
  • func : the function contents

replaceThis(obj) : replaces the object while keeping the reference

  • this : object to replace
  • obj : object used to replace

$(…path) : scans through an object using an array, returning the point leading from the path

  • this : object to scan
  • …path : the path used to find a (nested) item within this

check(sign,b,c) : evaluates a == b returning c if true, otherwise A

check(b,c) : uses default sign

– tip: when assigning to a variable, wrap it in an array: [a] = a.check(1,2); otherwise the value is not unwrapped

  • this (a) : the value/variable(s) to check
  • sign : the conditional sign to use, ex. ===, >, <=, !=
  • b : the value(s) checking to this
  • c : the result(s) if true

Array

new(length,map) : creates a new array using a map and length

  • length : the length of the new array
  • map(index) : the function used to determine each individual items value
    • index : the index of the current item being mapped

Array.prototype

clearHoles() : removes empty slots in an array

  • this : the array (with empty slots) needing to be cleaned

keySegregation() : creates an object containing the indexes and normal properties of an array

addNext(length,map) : adds new items to an Array using a function

  • length : the amount of items
  • map(last) : the function used to determine each new items value
    • last : the value of the item before

Number.prototype

range(min,max,mode) : determines if this is within the range

  • this : the value being checked to see if its within the range
  • min : the minimum point in the range (can swap with max)
  • max : the maximum point in the range (can swap with min)
  • mode[‘on’,’within’] : determines if this can be on the edge or the range
    • ‘on’ : this can be on the edge of the range
    • ‘within’ : this cannot be on the edge of the range

centerRange(mid,range,mode) : determines if this is within a range

  • this : the value being check to see if its within the range
  • mid : the middle of the range
  • range : the size/radius of the range
  • mode[‘on’,’within’] : determines if this can be on the edge or the range
    • ‘on’ : this can be on the edge of the range
    • ‘within’ : this cannot be on the edge of the range

Clone this wiki locally