Skip to content

7.3.0

Latest

Choose a tag to compare

@dy dy released this 23 Mar 21:14
· 2 commits to master since this release

from accepts fill value or map function as second arg, like Array.from:

from(1024, 0.5)                          // filled buffer
from(1024, (s, i) => Math.sin(i * 0.1)) // generate
from(buf, v => v * 0.5)                  // clone + transform
from(buf, 0)                             // zeroed clone (replaces like)

Removed like and resize — covered by from and slice/pad.