buffer-replace
Like String#replace
, but for buffers.
Usage
const replace = ; // Buffer('foo-bar') ;// Buffer('foo-bar') ;// Buffer('foo-bar')
Installation
$ npm install buffer-replace
API
replace(buf, a, b)
Replace all occurences of a
in buf
with b
. All arguments can be either buffers or strings, but the return value is always a buffer.
License
MIT