{ } qjs-modules

reflect

Source: lib/reflect.js (pure JS)

Reflection / (de)serialization helpers that encode JS values into a descriptive form and back, plus prototype utilities.

Exports

ExportArgsKindDescription
hasPrototype(obj, ...proto)1+functionWhether any of proto is in obj's prototype chain.
makeFunctionWithArgs(code, args)1–2functionBuilds a Function from code and parameter names.
getKeys(obj, t)1–2generatorYields keys of obj filtered by predicate t(desc, key).
EncodeJS(val, stack, mapFn)1–3functionEncodes a JS value into a serializable descriptor.
EncodeObj(obj, keys, stack, mapFn)1–4functionEncodes an object's selected keys.
DecodeJS(info)1functionReconstructs a JS value from an EncodeJS descriptor.
TypedArray, TypedArrayPrototype—constThe shared TypedArray base and its prototype.
JSValue, JSNumber, JSString, JSBoolean, JSSymbol, JSRegExp, JSObject, JSArray, JSTypedArray, JSFunction, JSProperty, JS—re-exportValue-wrapper types used by the encoder.