A [ponyfill](https://ponyfill.com) for `Buffer.fill`.
npm install buffer-fillA ponyfill for Buffer.fill.
Works as Node.js: v6.4.0
Works on Node.js: v0.10.0
``sh`
npm install --save buffer-fill
`js
const fill = require('buffer-fill')
const buf = Buffer.allocUnsafe(5)
console.log(buf.fill(8))
//=>
console.log(buf.fill(9, 2, 4))
//=>
console.log(buf.fill('linus', 'latin1'))
//=>
console.log(buf.fill('\u0222'))
//=>
`
- value <String> | <Buffer> | <Integer> The value to fill buf withoffset
- <Integer> Where to start filling buf. Default: 0end
- <Integer> Where to stop filling buf (not inclusive). Default: buf.lengthencoding
- <String> If value is a string, this is its encoding. Default: 'utf8'buf
- Return: <Buffer> A reference to
Fills buf with the specified value. If the offset and end are not given,buf
the entire will be filled. This is meant to be a small simplification toBuffer
allow the creation and filling of a to be done on a single line.
If the final write of a fill() operation falls on a multi-byte character, thenbuf
only the first bytes of that character that fit into are written.
- buffer-alloc-unsafe A ponyfill for Buffer.allocUnsafeBuffer.alloc
- buffer-alloc A ponyfill for Buffer.from`
- buffer-from A ponyfill for