Final docstring cleanup & adding hap tag to logValues for consistency

This commit is contained in:
Aria
2025-08-05 22:40:11 -05:00
parent de15d79edf
commit f22f89347e
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -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));
}
+1 -1
View File
@@ -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();