Greasy Fork is available in English.

NH_base

Base library usable any time.

Od 14.11.2023.. Pogledajte najnovija verzija.

Ovu skriptu ne treba izravno instalirati. To je biblioteka za druge skripte koje se uključuju u meta direktivu // @require https://update.greasyfork.org/scripts/477290/1280426/NH_base.js

Autor
Mike Castle (Nexus)
Verzija
31
Stvoreno
12.10.2023.
Ažurirano
14.11.2023.
Licenza
GPL-3.0-or-later

lib/base - A NexusHoratio library.

Pure JavaScript stuff. Nothing here should be WEB API aware, except Logger's use of console.

Exported properties (as of version 21)

  • version - Bumped per release.
  • NOT_FOUND - Constant (to make eslint's no-magic-numbers setting happy).
  • ensure - Ensures appropriate versions of NexusHoratio libraries are loaded.
  • DefaultMap - Subclass of Map similar to Python's defaultdict.
  • Logger - Fancy-ish log messages (likely over engineered).
  • uuId - Create a UUID-like string with a base.
  • safeId - Normalizes a string to be safe to use as an HTML element id.
  • strHash - Equivalent (for now) of Java's hashCode (do not store externally).
  • Dispatcher - Simple dispatcher (event bus).
  • simpleParseWords - Separate a string of concatenated words along transitions.

More details are in base.js as JSDoc.