- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Buffer Alloc
A ponyfill for Buffer.alloc.
Works as Node.js: v7.0.0
Works on Node.js: v0.10.0
Installation
npm install --save buffer-alloc
Usage
const alloc = require('buffer-alloc')
console.log(alloc(4))
//=> <Buffer 00 00 00 00>
console.log(alloc(6, 0x41))
//=> <Buffer 41 41 41 41 41 41>
console.log(alloc(10, 'linus', 'utf8'))
//=> <Buffer 6c 69 6e 75 73 6c 69 6e 75 73>
API
alloc(size[, fill[, encoding]])
size<Integer> The desired length of the newBufferfill<String> | <Buffer> | <Integer> A value to pre-fill the newBufferwith. Default:0encoding<String> Iffillis a string, this is its encoding. Default:'utf8'
Allocates a new Buffer of size bytes. If fill is undefined, the Buffer will be zero-filled.
See also
- buffer-alloc-unsafe A ponyfill for
Buffer.allocUnsafe - buffer-fill A ponyfill for
Buffer.fill - buffer-from A ponyfill for
Buffer.from