npm

Need private packages and team management tools?Check out npm Orgs. »

splice-buffer

1.0.0 • Public • Published

splice-buffer Build Status

Remove or replace part of a Buffer like Array#splice

Install

$ npm install splice-buffer

Usage

const spliceBuffer = require('splice-buffer');
 
spliceBuffer('unicorn', 3, 4, 'verse');
//=> 'universe'

API

spliceBuffer(input, index, count, [insert])

input

Type: Buffer

index

Type: number

Index to start splicing.

count

Type: number

Number of characters to remove.

insert

Type: string

String to insert in place of the removed Buffer.

License

MIT © Kevin Mårtensson

install

npm i splice-buffer

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability