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