der-die-das
Version:
Determine article for german words (der/die/das)
20 lines (16 loc) • 391 B
JavaScript
;
const http = require('http');
module.exports = function(word, callback) {
return http.get({
host: 'pocket.dict.cc',
path: `/?s=${word}`
}, function(response) {
let body = '';
response.on('data', function(d) {
body += d;
});
response.on('end', function() {
callback(body);
});
});
}