Final docstring cleanup & adding hap tag to logValues for consistency
This commit is contained in:
parent
de15d79edf
commit
f22f89347e
2 changed files with 4 additions and 5 deletions
|
|
@ -854,8 +854,7 @@ export class Pattern {
|
|||
}
|
||||
|
||||
/**
|
||||
* Writes the content of the current event to the console, which is visible in the side menu
|
||||
* or as the developer console.
|
||||
* Writes the content of the current event to the console (visible in the side menu).
|
||||
* @name log
|
||||
* @memberof Pattern
|
||||
* @example
|
||||
|
|
@ -869,13 +868,13 @@ export class Pattern {
|
|||
|
||||
/**
|
||||
* A simplified version of `log` which writes all "values" (various configurable parameters)
|
||||
* within the event to the console, which is visible in the side menu or as the developer console.
|
||||
* within the event to the console (visible in the side menu).
|
||||
* @name logValues
|
||||
* @memberof Pattern
|
||||
* @example
|
||||
* s("bd sd").gain("0.25 0.5 1").n("2 1 0").logValues()
|
||||
*/
|
||||
logValues(func = (value) => `${stringifyValues(value, true)}`) {
|
||||
logValues(func = (value) => `[hap] ${stringifyValues(value, true)}`) {
|
||||
return this.log((hap) => func(hap.value));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1338,7 +1338,7 @@ describe('Pattern', () => {
|
|||
});
|
||||
|
||||
expect(mockConsoleLog).toHaveBeenCalledWith(
|
||||
'%cvalue:a note:c#',
|
||||
'%c[hap] value:a note:c#',
|
||||
'background-color: black;color:white;border-radius:15px',
|
||||
);
|
||||
mockConsoleLog.mockRestore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue