此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org.cn/scripts/477290/1290536/NH_base.js
Pure JavaScript stuff. Nothing here should be WEB API aware, except Logger's use of console.
Exported properties (as of version 36)
- 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).
- MessageQueue - A simple message system that will queue messages to be delivered.
- issues - NexusHoratio libraries log issues here.
- simpleParseWords - Separate a string of concatenated words along transitions.
More details are in base.js as JSDoc.