Skip to content

debugging

Makes a call observable — logging, serializing, inspecting context.

NameCategoryDescription
debug
hooks

Logs the current hook context to the console for debugging purposes. Displays timestamp, service path, method, type, id, data, query, result, and any additional param fields you specify.

contextToJson
utils

Converts a FeathersJS HookContext to a plain JSON object by calling toJSON() if available. This is important when using lodash get/has on the context, since the HookContext class uses getters that may not be enumerable.

stringifyParams
utils

Serializes Feathers params into a stable, deterministic string — built for generating cache keys.

Two normalizations make semantically-equal params produce the same string:

  • sortObject: object keys are sorted recursively.
  • sortArray: elements of query array operators ($or, $and, $nor, $not, $in, $nin) are order-normalized.

Serialization is crash-safe and never throws on values that leak through a params whitelist: circular references become [Circular], functions/undefined/symbol are dropped (like JSON.stringify), BigInt is stringified, and objects with toJSON (e.g. Date, bson ObjectId) are serialized via it.

See all tags for the full vocabulary.

Released under the MIT License.