0.0.7 • Published 6 years ago

string-batch-update v0.0.7

Weekly downloads
21
License
-
Repository
-
Last release
6 years ago

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)
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago