Skip to content

Instantly share code, notes, and snippets.

View Ratismal's full-sized avatar

stupid cat Ratismal

View GitHub Profile
@Ratismal
Ratismal / 0_readme.md
Last active September 8, 2021 17:58
A function that will scan through an object to find a specific term. Made for investigating datalayers.

Object Scanner

A function that will scan through an object to find a specific term or value. It searches recursively, and ignores duplicate objects along a path.

This function was made for performing datalayer explorations. It's not a perfect solution, as it cannot call functions or find locally scoped values.

Usage

Copy 1_object_scanner.min.js and paste it onto desired page. Run the function searchForTerm(term, options). See object_scanner.js for usage information.