Skip to content

Commit 24f71ec

Browse files
committed
backwards compatible alias with a warning
1 parent b233bb8 commit 24f71ec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,17 @@ var watson = {
288288
});
289289
});
290290

291+
Object.defineProperty(watson, 'language_translation', {
292+
enumerable: false,
293+
configurable: true,
294+
writable: true,
295+
value: function(options) {
296+
if (!options.silent) {
297+
//eslint-disable-next-line no-console
298+
console.warn(new Error("Watson language_translation is now language_translator. Set {silent: true} to disable this message.").stack)
299+
}
300+
return watson.language_translator(options);
301+
}
302+
});
303+
291304
module.exports = watson;

0 commit comments

Comments
 (0)