Socket
Book a DemoInstallSign in
Socket

splice-buffer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splice-buffer

Remove or replace part of a Buffer like Array#splice

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

add

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts