SearchKey

Chercher une clé dans un objet JS en mode strict ou include sur différents niveaux de profondeur.

بۇ قوليازمىنى بىۋاسىتە قاچىلاشقا بولمايدۇ. بۇ باشقا قوليازمىلارنىڭ ئىشلىتىشى ئۈچۈن تەمىنلەنگەن ئامبار بولۇپ، ئىشلىتىش ئۈچۈن مېتا كۆرسەتمىسىگە قىستۇرىدىغان كود: // @require https://update.greasyfork.org/scripts/578734/1828936/SearchKey.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

ئاپتورى
Atlantis-JS
نەشرى
0.0.1.20260518141033
قۇرۇلغان ۋاقتى
2026-05-18
يېڭىلانغان ۋاقتى
2026-05-18
Size
1.4 KB
ئىجازەتنامىسى
يوق

Chercher une clé dans un objet JS en mode strict ou include sur différents niveaux de profondeur.

Skip les valeurs falsy (null, undefined, "", 0, false) et continue la recherche.

  • -
  • param {Object} target - L'objet dans lequel chercher
  • param {string} searchedKey - Le nom de clé à chercher
  • param {boolean} strictName - true = nom exact, false = includes (défaut: true)
  • param {number} maxDepth - Profondeur de recherche, 1 = niveau courant seulement (défaut: 1)
  • example
  • searchKey(state, 'search_key_2'); // nom exact, niveau courant
  • searchKey(cache, 'key', false); // includes, niveau courant
  • searchKey(state, 'key', false, 20); // includes, recherche profonde
  • searchKey(state, 'search_key_2', true, 20); // nom exact, recherche profonde