Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdlib: add support for util.inspect.custom to AppError #458

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

dirkdev98
Copy link
Member

This is used when AppErrors are passed to Node.js' util#inspect directly, or indirectly via console.log.
It does not work with console.dir tho.

Closes #453

This is used when AppErrors are passed to Node.js' util#inspect directly, or indirectly via console.log.
It does not work with console.dir tho.

Closes #453
@github-actions
Copy link
Contributor

==== Benchmark result ====

Node.js version: 14

Total benchmarks: 9
          Passed: 9
          Failed: 0
-----------
object validator simple      5000000  iterations     485  ns/op
object validator nested        50000  iterations   47141  ns/op
logger - strings              500000  iterations    2320  ns/op
logger - objects              500000  iterations    2814  ns/op
logger - deep objects         500000  iterations    4789  ns/op
uuid                         2000000  iterations     563  ns/op
uuid.isValid                10000000  iterations     165  ns/op
isNil                      500000000  iterations       0  ns/op
isPlainObject              100000000  iterations      19  ns/op

@github-actions
Copy link
Contributor

==== Benchmark result ====

Node.js version: 15

Total benchmarks: 9
          Passed: 9
          Failed: 0
-----------
object validator simple      5000000  iterations     467  ns/op
object validator nested        50000  iterations   45989  ns/op
logger - strings              500000  iterations    2067  ns/op
logger - objects              500000  iterations    2489  ns/op
logger - deep objects         500000  iterations    4374  ns/op
uuid                         2000000  iterations     611  ns/op
uuid.isValid                10000000  iterations     128  ns/op
isNil                      500000000  iterations       0  ns/op
isPlainObject              100000000  iterations      17  ns/op

@github-actions
Copy link
Contributor

==== C8 test coverage ====
Statements: 70.79% ( 17969/25384 )
Branches : 71.62% ( 2110 /2946 )
Functions : 70.69% ( 668 /945 )
Lines : 70.79% ( 17969 /25384 )

@dirkdev98 dirkdev98 merged commit 0ee86a6 into main Oct 30, 2020
@dirkdev98 dirkdev98 deleted the feat/template-errors branch October 30, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

code-gen: collect errors on context and have dedicated reporters
1 participant