summaryrefslogtreecommitdiff
path: root/src/node_modules/inversify/lib/planning/queryable_string.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
committerMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
commit46e43f4bde4a35785b4997b81e86cd19f046b69b (patch)
treec53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/inversify/lib/planning/queryable_string.js
downloadlangdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip
Commit
Diffstat (limited to 'src/node_modules/inversify/lib/planning/queryable_string.js')
-rw-r--r--src/node_modules/inversify/lib/planning/queryable_string.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/node_modules/inversify/lib/planning/queryable_string.js b/src/node_modules/inversify/lib/planning/queryable_string.js
new file mode 100644
index 0000000..8eeec2f
--- /dev/null
+++ b/src/node_modules/inversify/lib/planning/queryable_string.js
@@ -0,0 +1,27 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var QueryableString = (function () {
+ function QueryableString(str) {
+ this.str = str;
+ }
+ QueryableString.prototype.startsWith = function (searchString) {
+ return this.str.indexOf(searchString) === 0;
+ };
+ QueryableString.prototype.endsWith = function (searchString) {
+ var reverseString = "";
+ var reverseSearchString = searchString.split("").reverse().join("");
+ reverseString = this.str.split("").reverse().join("");
+ return this.startsWith.call({ str: reverseString }, reverseSearchString);
+ };
+ QueryableString.prototype.contains = function (searchString) {
+ return (this.str.indexOf(searchString) !== -1);
+ };
+ QueryableString.prototype.equals = function (compareString) {
+ return this.str === compareString;
+ };
+ QueryableString.prototype.value = function () {
+ return this.str;
+ };
+ return QueryableString;
+}());
+exports.QueryableString = QueryableString;