UNPKG

prose-js

Version:

Natural language-to-pseudocode compiler.

19 lines (16 loc) 366 B
/** * Language detector module. * @exports LangDetector */ var franc = require('franc'); function LangDetector() { /** * Returns a string representation of the language detected. * * @param {string} string - String from which language is to be detected. */ this.detect = function(string) { return franc(string); } } module.exports = LangDetector;