NH_base

Base library usable any time.

이 스크립트는 직접 설치해서 쓰는 게 아닙니다. 다른 스크립트가 메타 명령 // @require https://update.greasyfork.org/scripts/477290/1333365/NH_base.js(으)로 포함하여 쓰는 라이브러리입니다.

개발자
Mike Castle (Nexus)
버전
52
생성
2023-10-12
갱신
2024-02-25
라이선스
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 52)

  • version - Bumped per release.
  • NOT_FOUND - Constant (to make eslint's no-magic-numbers setting happy).
  • ONE_ITEM - Constant useful for testing length of an array.
  • ensure - Ensures appropriate versions of NexusHoratio libraries are loaded.
  • Exception - Base exception that uses the name of the class.
  • Dispatcher - Simple dispatcher (event bus).
  • MessageQueue - A simple message system that will queue messages to be delivered.
  • issues - NexusHoratio libraries and apps should log issues here.
  • 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).
  • simpleParseWords - Separate a string of concatenated words along transitions.
  • Service - Base class for building services that can be turned on and off.

More details are in base.js as JSDoc.