Skip to content

Commit 59f5850

Browse files
authored
Clear onPeak docs
1 parent 6a85277 commit 59f5850

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/peakDetect.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ class PeakDetect {
160160
}
161161

162162
/**
163-
* onPeak accepts two arguments: a function to call when
164-
* a peak is detected. The value of the peak,
165-
* between 0.0 and 1.0, is passed to the callback.
163+
* onPeak accepts one or two arguments: a callback function to call when
164+
* a peak is detected and an optional callback parameter. The value of the
165+
* peak, between 0.0 and 1.0, is always passed to the callback first, with
166+
* the optional parameter provided second.
166167
*
167168
* @method onPeak
168169
* @param {Function} callback Name of a function that will

0 commit comments

Comments
 (0)