Debugger(labelopt, enabledopt)

Debug utility.

Constructor

new Debugger(labelopt, enabledopt)

Parameters:
Name Type Default Description
labelopt string [DEBUG]

Log label

enabledopt boolean true

Whether to enable debugging

Author:
Satoshi Soma (amekusa.com)
License:
Apache-2.0
Copyright 2020 Satoshi Soma

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Source:
src/scripts/Debugger.js, line 19

Methods

call(fn, …argsrpt)any

Calls the given function.

Parameters:
Name Type Description
fn function

Function to call

argsrpt any

Arguments to pass to fn

Source:
src/scripts/Debugger.js, line 54
Returns:

Return of fn

Type:
any

disable()

Disables debugging.

Source:
src/scripts/Debugger.js, line 37

enable()

Enables debugging.

Source:
src/scripts/Debugger.js, line 31

log(…argsrpt)

Outputs logs to console.

Parameters:
Name Type Description
argsrpt any

Infos to log

Source:
src/scripts/Debugger.js, line 44

slow(weight)

Simulates a heavy computing operation.

Parameters:
Name Type Description
weight number

How heavy

Source:
src/scripts/Debugger.js, line 62

Licensed under the Apache License 2.0

Documentation generated by JSDoc 4.0.2 using Docolatte theme