From f22f89347e9dc8da263a56d30bde6f41187b5506 Mon Sep 17 00:00:00 2001 From: Aria Date: Tue, 5 Aug 2025 22:40:11 -0500 Subject: [PATCH] Final docstring cleanup & adding hap tag to logValues for consistency --- packages/core/pattern.mjs | 7 +++---- packages/core/test/pattern.test.mjs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index f64761f4f..dbf1b17f7 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -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)); } diff --git a/packages/core/test/pattern.test.mjs b/packages/core/test/pattern.test.mjs index b82d39b9d..1df5c8776 100644 --- a/packages/core/test/pattern.test.mjs +++ b/packages/core/test/pattern.test.mjs @@ -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();