5.4.87 • Published 10 months ago

@erboladaiorg/eum-veniam-similique v5.4.87

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@erboladaiorg/eum-veniam-similique

@erboladaiorg/eum-veniam-similique is a sophisticated console reporting system designed to provide developers with enhanced feedback, including line traces of events, multi-object reporting, event listening, and consistent logging. This module modifies the Node.js global console to deliver a seamless and informative debugging experience with unlimited object depth.

Although currently optimized for server-side Node.js, future updates may include support for web browsers. For comprehensive documentation, please visit the docs.

This open-source project originates from a console module used in @jumpcutking/threads and is a key component of The Universe platform.

Features

  • Enhanced Feedback: Provides line traces of events, multi-object reporting, and event listening.
  • Consistent Logging: Modifies the global console for a uniform logging experience.
  • Unlimited Depth: Allows unlimited object depth for detailed inspection.
  • Error Handling: Improved handling of undefined objects and safe error generation.

What's New

v1.7.0

  • Added improved undefined object handling when passing objects to console.function("String", $obj).

v1.6.0

  • Additional bug fixes.
  • Introduced jckConsole.TruncateTopLevel for reporting top-level object properties, useful for large objects without removing nested arrays and attached objects.

v1.5.0

  • jckConsole now provides generateSafeError for automatically generating safe, communicable error objects.
  • Added a string variable to match the original stack trace item for easier debugging in VSCode.

Installation

Install the module using NPM:

```bash npm install @erboladaiorg/eum-veniam-similique ```

Usage

Integrating @erboladaiorg/eum-veniam-similique is straightforward. Add the following code at the top of your script:

```javascript const jckConsole = require('@erboladaiorg/eum-veniam-similique'); jckConsole.startup({ ...options }); ```

@erboladaiorg/eum-veniam-similique will not override the global console object until `startup()` is called with the specified options.

Options

NameTypeDescription
reportToConsolebooleanAutomatically report to the terminal and console.
generateStacktracebooleanGenerate a stacktrace object for each log message.
storeLogsbooleanStore logs in memory.
depthnumberDepth to inspect objects (0 for unlimited).

Adding a Callback or Listening to an Event

@erboladaiorg/eum-veniam-similique supports two types of callbacks: one for all console calls and another for specific console functions.

Example

```javascript jckConsole.on('entry', (type, message, args, stack, from) => { // Your code here... });

// or

console.on('entry', (type, message, args, stack, from) => { // Your code here... }); ```

```javascript jckConsole.on('warn', (message, args, stack, from) => { // Your code here... });

// or

console.on('warn', (message, args, stack, from) => { // Your code here... }); ```

Supported Methods

NameTypeDescription
logfunctionThe log function.
infofunctionThe info function.
warnfunctionThe warn function.
errorfunctionThe error function.
debugfunctionThe debug function.

Logging Entries

@erboladaiorg/eum-veniam-similique can store logs in memory for later retrieval, each stamped with DateTime and, if enabled, a stacktrace object.

Example

```javascript const entries = jckConsole.getEntries(); console.getEntries();

// Clear entries jckConsole.clearEntries(); console.clearEntries(); ```

Log Entry Object

NameTypeDescription
typestringThe type of console message.
messagestringThe message provided to the console object.
args*Additional arguments provided.
stackArrayStacktrace object array.
whenDateTimeEntry creation time.
fromobjectStacktrace object for the original caller.

Building Documentation

To build the documentation, run the following command:

```bash npm run docs ```

Ensure you have the `jsdoc-to-markdown` module installed:

```bash npm install jsdoc-to-markdown ```

Using Node's Console Object

You can still use the original console object by creating a new instance after overriding the global console object.

```javascript const { Console } = require('node:console'); const myConsole = new Console({ stdout: process.stdout, stderr: process.stderr }); ```

Code Overview

This module replaces Node's built-in console with one that supports event listeners, enabling child threads to communicate using console.log syntax. It is designed for server-side use and has not been tested for client-side applications.

For detailed implementation, refer to the source code and examples provided in the repository.

Notes from the Project Creator

Rewritten: I've asked ChatGPT 4o to help me rewrite the README.md file for the @erboladaiorg/eum-veniam-similique module. It's based on the one I've written and provides a deep indepth view of the code. If you have any questions, or prefer the older style, please let me know. Thank you!

TypedArrayUint8ArrayenderslotshimramdaJSON-SchemaeventsbyteLengthtesteroptionhttpsmake dirawesomesauceshebangUnderscoreES2020awslanguageECMAScript 2022globalscoreshellAsyncIteratorwriteprunechecktostringtagES2018positiveasserteslintplugincloudsearchexit-coderesolvecolumnsMapIteratorwindowserializationObservablePromiseelasticachebcryptstablejsxpatchfnmatchsettersameValueZerojson-schemaECMAScript 2021equalitychildSymbol.toStringTagcommand-lineclass-validatorinterruptsStreamformslazyes-abstractmatchAllvalidunicodeidlereplayutilECMAScriptES2019datastructureSymbolignorecreategraphqlthreeisConcatSpreadableimportexportpersistentbabel-coreTypeBoxreversefull-widthpropertiestypedamazonhotlistenersECMAScript 3emitWeakMapnested cssuuidgroupBynameObject.valuesObject.fromEntriesURLcodesestreevalueemrqsStyleSheetstatusrgbregular-expressionESnextgenericsECMAScript 2023lesscsstslibcloudtrailmoduleapiutil.inspectextraes2017protocol-buffersinternalsortedtypescriptworkflowInt8ArrayartutilitiesInt32ArraymapreduceecmascriptcloudfrontUint16ArraytransportcharacterES2016stringifytypedarrayfromtypeofstylesheetArrayBuffereslint-pluginsetglobalapolloglobal this valuecss-in-jseffect-tsspringjses2016coerciblesigtermeventEmitterflagsprototypephoneArray.prototype.includesloadingselfsignalpreserve-symlinkshookformjapaneseletfigletansifpsRxJSObject.isargumentquoteownpicomatchpinomulti-packagedeterministiccompile lessscheme-validationauthpostcss-pluginstructuredCloneagentpathbytenativezodajaxhardlinksbootstrap cssmanagercore-jstimeObject.definePropertysharedarraybufferreusedeepcopyharmonyform-validationpackage.jsonpackagesFloat32Arrayrfc9562arraybufferidentifierspurelessreducerslicecirculartc39es2015validateES5syntaxerrorsomedateerror-handlingpopmotiones2018ES7fast-clonepipestarterxtermcss lessequalrequestonceserializerplugintoReversedtoolsexpressdescriptoranimationcss variablei18nroutebannerless csslintelectronES8String.prototype.trimglobbootstrap lessprettybusygdprlockfilecolourCSSStyleDeclarationeslintfilterextendECMAScript 2020guides-shims.gitignoreflatvariablesposesequenceserializezeroclassnamescurllast@@toStringTagdefinefunctionalruntimeexecfilewafbddcliwgetgradients css3glacierdeep-cloneStreamschromiumconcatMapfastifyrecursiverfc4122YAMLbinariessettingscallbackpoint-freedependenciesbeanstalkqueueconsumedataviewreact-testing-librarydirectoryinvarianttouchauthenticationenvironmentsReflect.getPrototypeOfspawnruleses5handlerssimpledbnegative zerobufferssuperstructutilityelmirqmixinscjkweaksetRFC-6455hasOwnwindowstddpassworddependency manageryamlfast-deep-cloneperformantliveclientgroupchaireadclonemakemetadatadayjsArrayBuffer#slicedescriptorsrequireredactsetPrototypeOfsortchannelincludesiamArraysafeoffsetassertsescapefindLastIndexdeepreversedrdslinkviewstateconfigenumerabletypesafeeslintconfigcryptmovenodejsec2momentkeyswhatwges7getOwnPropertyDescriptorschemauser-streamsstylessymlinktextsnstelephoneArray.prototype.filterFunction.prototype.namefastcopyentriespropcurriedbundlerformattingreact animationmonorepocollectiontermObject.getPrototypeOfswfES2017envinferenceArrayBuffer.prototype.sliceschemeoptimizercss nestingpushECMAScript 2017autoscalingsuperagentspinnersstreams_.extendvariables in csstakeES3numbertypanioncacheReactiveXvaluesdescriptionesmerges3proxyreadablestreamtranspileES2023deepclonetypeECMAScript 2015lruargsaccessibilityRegExp#flagsbrowserlistfunction.lengthRxlengthdom-testing-libraryhasOwnProperty3dcommandprocessconfigurablejsonschemamatchesvarsendpointnodeforkfindwidthspinnerspeedclassesuploadES2015helpersmkdirpprefixoptimistECMAScript 2016mapa11ycomputed-typessharedString.prototype.matchAllcompareparsebrowserslistbinfindLastl10nRegExp.prototype.flagslocaltestingelbutilsebstranspilerboundstyled-componentsregular expressionhasio-tsperformanceconcatsetImmediateprogressjsdomreadableexitcolumnJSONUint32Arraypostcsscall-bind[[Prototype]]gesturesweakmapPushReactiveExtensionsnpmarrayparsinghelperes6regularcontainsinputquerystringbrowserloggingobjecthttp__proto__trimgetPrototypeOfreact poseconsoledefinePropertypyyamlloggerworkspace:*east-asian-widthdeep-copyjQuerycopycertificatesobjgetoptfast-deep-copyfast-copyES2021dropcallboundreal-timeless compilerdatadataViewfunctionUint8ClampedArraydotenvTypeScriptiterateasyncaccessorsigintjestponyfillzxArray.prototype.findLastcommandertrimStartprivate dataerrorcallcall-boundURLSearchParamssideoperating-systemroutingjsdiffinstallercompilerbindmkdirskinesishookscryptoWeakSetcollection.es6stylereact-hook-formSetinspecreactECMAScript 2019autoprefixer-0ES2022BigUint64Array.envWebSocketsnopeArray.prototype.flatpropertyrapidformatchineseimport256fetchpnpm9regextoArrayfastclonecssHyBiSystem.globalsymbolsjsonrangeerrorcolorsomitsqsbyteOffsetstringifierarraysFloat64ArrayprivatematchpreprocessorreducecloudformationexecassertionnegativegetintrinsiclogInt16ArrayfullsignedvalidatorstatelesssubprocessESlibphonenumberacorntypeerrorasciiArray.prototype.flatMapwaapiterminalECMAScript 7airbnbObject.entriesmacosrandomclassnameastwalkflattentypeshas-ownhigher-orderindicatorcallbindgetterinternal slotpolyfillfileMicrosoftwhichwarningprotobufstringassign$.extendfluxES6fpWebSocketObjectjshintformisdeleteimmutabledynamodbmrudragECMAScript 2018gitignoregetfullwidthcensorpredictabletrimRighttoobjectfastnamescloudwatchbinarytoStringTagloadbalancingrobustreact-hookstraverseglobal objectprototoolkitjson-schema-validationchrometacitinstallObject.assignyupenvironmentpackage managergradients cssarktypereact-componentiteratorjwtvartypedarraystoSortediterationroute53file systemvalidationvisualArray.prototype.containssyntaxregexpencryptionECMAScript 5argvbabelfixed-widthtyped arrayasterisksbufferObject.keysfsArray.prototype.flattentrimLeftuninstalllinuxurlsignalsredux-toolkitkoreanes-shim APImodulesdifftrimEndminimalveststoragegatewayvpcflatMap6to5ObservablesintrinsicforEachfunctionsworkerstyleguidettysesjavascriptshamwritableless.jsflagkeymkdirremovestylingmobilestreamframereventDispatcherhashqueryCSSimmertsoutputcoloropenssl
5.4.87

10 months ago

5.4.86

10 months ago

5.4.85

10 months ago

5.4.84

10 months ago

5.4.83

11 months ago

5.4.82

11 months ago

5.4.81

11 months ago

5.4.80

11 months ago

5.4.79

11 months ago

5.4.78

11 months ago

5.4.77

11 months ago

5.4.76

11 months ago

5.4.75

11 months ago

5.4.74

11 months ago

5.4.73

11 months ago

5.4.72

11 months ago

5.4.71

11 months ago

5.4.70

11 months ago

5.4.69

11 months ago

4.4.69

11 months ago

4.4.68

11 months ago

4.4.67

11 months ago

4.4.66

11 months ago

4.4.65

11 months ago

4.4.64

11 months ago

4.4.63

11 months ago

4.4.62

11 months ago

4.4.61

11 months ago

3.4.61

11 months ago

3.4.60

11 months ago

3.4.59

11 months ago

3.4.58

11 months ago

3.4.57

11 months ago

2.4.57

11 months ago

1.4.57

12 months ago

1.4.56

12 months ago

1.4.55

12 months ago

1.4.54

12 months ago

1.4.53

12 months ago

1.3.53

12 months ago

1.3.52

12 months ago

1.3.51

12 months ago

1.3.50

12 months ago

1.3.49

12 months ago

1.3.48

12 months ago

1.3.47

12 months ago

1.3.46

12 months ago

1.3.45

12 months ago

1.3.44

12 months ago

1.3.43

12 months ago

1.3.42

12 months ago

1.2.42

12 months ago

1.2.41

12 months ago

1.2.40

12 months ago

1.2.39

1 year ago

1.2.38

1 year ago

1.2.37

1 year ago

1.2.36

1 year ago

1.2.35

1 year ago

1.2.34

1 year ago

1.2.33

1 year ago

1.2.32

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.30

1 year ago

1.1.29

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago