File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 3939 * ` readonly ` : Deprecated; use the new ` readOnly ` property instead.
4040 * ` rev ` : Deprecated.
4141 * Changes to the ` src/static/js/Changeset.js ` library:
42- * ` opIterator() ` : The unused start index parameter has been removed.
42+ * ` opIterator() ` : The unused start index parameter has been removed, as has
43+ the unused ` lastIndex() ` method on the returned object.
4344
4445### Notable enhancements
4546
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ exports.newLen = (cs) => exports.unpack(cs).newLen;
134134 *
135135 * @typedef {object } OpIter
136136 * @property {Function } hasNext -
137- * @property {Function } lastIndex -
138137 * @property {Function } next -
139138 */
140139
@@ -146,14 +145,9 @@ exports.newLen = (cs) => exports.unpack(cs).newLen;
146145 */
147146exports . opIterator = ( opsStr ) => {
148147 const regex = / ( (?: \* [ 0 - 9 a - z ] + ) * ) (?: \| ( [ 0 - 9 a - z ] + ) ) ? ( [ - + = ] ) ( [ 0 - 9 a - z ] + ) | \? | / g;
149- let curIndex = 0 ;
150- let prevIndex = curIndex ;
151148
152149 const nextRegexMatch = ( ) => {
153- prevIndex = curIndex ;
154- regex . lastIndex = curIndex ;
155150 const result = regex . exec ( opsStr ) ;
156- curIndex = regex . lastIndex ;
157151 if ( result [ 0 ] === '?' ) {
158152 exports . error ( 'Hit error opcode in op stream' ) ;
159153 }
@@ -178,12 +172,9 @@ exports.opIterator = (opsStr) => {
178172
179173 const hasNext = ( ) => ! ! ( regexResult [ 0 ] ) ;
180174
181- const lastIndex = ( ) => prevIndex ;
182-
183175 return {
184176 next,
185177 hasNext,
186- lastIndex,
187178 } ;
188179} ;
189180
You can’t perform that action at this time.
0 commit comments