@oozcitak/util
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -13,2 +13,4 @@ /** | ||
private _second; | ||
private _startMark; | ||
private _endMark; | ||
/** | ||
@@ -75,2 +77,14 @@ * Initializes a new `StringWalker`. | ||
skip(countOrFunc: number | ((char: string) => boolean)): void; | ||
/** | ||
* Sets the start index to the current position for the `getMarked` function. | ||
*/ | ||
markStart(): void; | ||
/** | ||
* Sets the end index to the current position for the `getMarked` function. | ||
*/ | ||
markEnd(): void; | ||
/** | ||
* Gets the string between start and marks. | ||
*/ | ||
getMarked(): string; | ||
} | ||
@@ -77,0 +91,0 @@ /** |
@@ -24,2 +24,4 @@ "use strict"; | ||
this._second >= 0xDC00 && this._second <= 0xDFFF); | ||
this._startMark = 0; | ||
this._endMark = 0; | ||
} | ||
@@ -233,2 +235,21 @@ /** | ||
} | ||
/** | ||
* Sets the start index to the current position for the `getMarked` function. | ||
*/ | ||
markStart() { | ||
this._startMark = this._index; | ||
this._endMark = this._index; | ||
} | ||
/** | ||
* Sets the end index to the current position for the `getMarked` function. | ||
*/ | ||
markEnd() { | ||
this._endMark = this._index; | ||
} | ||
/** | ||
* Gets the string between start and marks. | ||
*/ | ||
getMarked() { | ||
return this._chars.slice(this._startMark, this._endMark); | ||
} | ||
} | ||
@@ -235,0 +256,0 @@ exports.StringWalker = StringWalker; |
{ | ||
"name": "@oozcitak/util", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "util", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62147
1380