2015-08-25 20:48:19 -07:00
|
|
|
export default {
|
2018-10-10 17:26:23 +05:30
|
|
|
name: "initialize-data-explorer",
|
2015-08-25 20:48:19 -07:00
|
|
|
initialize(container) {
|
2018-10-10 17:26:23 +05:30
|
|
|
container.lookup("store:main").addPluralization("query", "queries");
|
2015-11-21 12:49:23 +11:00
|
|
|
|
2015-08-25 20:48:19 -07:00
|
|
|
if (!String.prototype.endsWith) {
|
2019-06-14 12:29:06 -04:00
|
|
|
// eslint-disable-next-line no-extend-native
|
2020-09-04 13:23:11 +02:00
|
|
|
String.prototype.endsWith = function (searchString, position) {
|
2019-07-16 12:46:32 +02:00
|
|
|
const subjectString = this.toString();
|
2015-08-25 20:48:19 -07:00
|
|
|
if (position === undefined || position > subjectString.length) {
|
|
|
|
|
position = subjectString.length;
|
|
|
|
|
}
|
|
|
|
|
position -= searchString.length;
|
2019-07-16 12:46:32 +02:00
|
|
|
const lastIndex = subjectString.indexOf(searchString, position);
|
2015-08-25 20:48:19 -07:00
|
|
|
return lastIndex !== -1 && lastIndex === position;
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-09-04 13:23:11 +02:00
|
|
|
},
|
2015-08-25 20:48:19 -07:00
|
|
|
};
|