Chad's public fiddles
-
Local Date from Date Only String
If you pass a date to the Date() constructor it will be midnight UTC. This is if you want it midnight local time.
-
Simulate Redacted Text
JavaScript and CSS that looks for del and strike tags that will then simulate redacted text (for fun, not real).
-
YouTube link to Embed
Transform a link to a YouTube video into an embed allowing content creators to just place a link in the CMS and allow Embed to happen automatically
-
Merge an object into another
Perfect for having a set of default properties and taking in a new set of properties.
-
Map column headers to 2D array
Turn a 2 dimensional array (table) into an array of rows/objects with column headers forming key/value pairs for each "row"
-
Process Chunks of Array (JS)
Loop through and process chunks of an array such as with slice()