onlyurei/knockout-spa

View on GitHub
locale/resources.js

Summary

Maintainability
A
0 mins
Test Coverage
define(['i18n!nls/resources'], function (resources) {

  var resource = function (key) {
    if (!key || !resources) {
      return null;
    }
    return resources[key] || ('MISSING RESOURCE: ' + key);
  };

  return resource;

});