1.0.16 • Published 3 years ago

editor-diff v1.0.16

Weekly downloads
16
License
ISC
Repository
-
Last release
3 years ago

Editor Diff

NPM version Build status Test coverage License Downloads Gittip

Get the first event in a set of event emitters and event pairs, then clean up after itself.

Install

$ npm install editor-diff

API

var Diff = require('editor-diff')

first(arr, listener)

Invoke listener on the first event from the list specified in arr. arr is an array of arrays, with each array in the format [ee, ...event]. listener will be called only once, the first time any of the given events are emitted. If error is one of the listened events, then if that fires first, the listener will be given the err argument.

The listener is invoked as listener(err, ee, event, args), where err is the first argument emitted from an error event, if applicable; ee is the event emitter that fired; event is the string event name that fired; and args is an array of the arguments that were emitted on the event.

Diff.ueditorDiff(oldStr, newStr, type, [qIndex], [callback])
// oldStr: 编辑前的数据 newStr: 编辑后的数据, type: add或者del判断编辑前后调用, 【qIndex】,试卷中试题的题号【callback】试卷用
// 判断oldStr, newStr类型是否为字符串
1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago