{"size": 739, "ext": "js", "max_stars_repo_path": "src/lib/ractive/helpers.js", "max_stars_repo_name": "granmoe/ractive-hello-world", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/lib/ractive/helpers.js", "max_issues_repo_name": "granmoe/ractive-hello-world", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/lib/ractive/helpers.js", "max_forks_repo_name": "granmoe/ractive-hello-world", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.4827586207, "max_line_length": 84, "alphanum_fraction": 0.6806495264}
import Ractive from 'ractive';
const helpers = Ractive.defaults.data;

import { datetime } from 'ractive-datetime';
import { md } from 'ractive-markdown';

helpers.datetime = datetime;
helpers.md = md;

// ## I18N

import i18next from 'i18next';
import resources from 'i18next-resource-store-loader!../../locales/index.js';

i18next.init({
  resources,
  fallbackLng: 'en',
  interpolationPrefix: '{{',
  interpolationSuffix: '}}'
}, () => {
  /**
   * Translation helper, embeds translated string and allows passing embeded params.
   * @param {String} key Translation string key.
   * @param {String} ...params Optional params
   * @returns {String} Translated string.
   */
  helpers.t = (key, ...params) => i18next.t(key, params);
});
