string-batch-update
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

string-batch-update

installation

# npm
npm install string-batch-update


# yarn
yarn install string-batch-update

usage

import {strintBatchUpdate, EDIT_TYPE} from 'string-batch-update'

let nextText = stringBatchReplace("abc",[
    {
          type:EDIT_TYPE.insert,
          start:1,
          text:"x"
        },
        {
          type:EDIT_TYPE.delete,
          start:1,
          end:2
        },
        {
          type:EDIT_TYPE.replace,
          start:2,
          end:3,
          text:"yy"
        }
])

// should output axyy
console.log(newText)

Readme

Keywords

none

Package Sidebar

Install

npm i string-batch-update

Weekly Downloads

0

Version

0.0.7

License

none

Unpacked Size

162 kB

Total Files

30

Last publish

Collaborators

  • qweasd1z1ztony