api-bdd-test
Version:
use the bdd(cucumber) to test the RESTfull API
28 lines (23 loc) • 678 B
JavaScript
(function() {
var extend;
extend = require('util-ex/lib/_extend');
module.exports = function(aLanguage, aVocabulary) {
var newLocalise, oldLocalise;
oldLocalise = aLanguage.localise;
newLocalise = function(keyword) {
var result;
result = this.vocabulary[keyword];
if (!result) {
result = this._localise_(keyword);
}
return result;
};
aLanguage.vocabulary = extend({}, aLanguage.vocabulary, aVocabulary);
if (oldLocalise !== newLocalise) {
aLanguage.localise = newLocalise;
aLanguage._localise_ = oldLocalise;
}
return aLanguage;
};
}).call(this);
//# sourceMappingURL=language.js.map