moved phonetic export

This commit is contained in:
antelle 2019-09-15 13:30:38 +02:00
parent 2688e761ba
commit 556c5dd56a
1 changed files with 6 additions and 2 deletions

View File

@ -303,7 +303,7 @@ function postProcess(wordObj) {
* @param {*} [options] A collection of options to control the word generator.
* @returns {string} A generated word.
*/
module.exports.generate = function(options) {
function generate(options) {
options = getOptions(options);
const length = options.length;
const wordObj = {
@ -316,4 +316,8 @@ module.exports.generate = function(options) {
addSyllable(wordObj);
}
return postProcess(wordObj).substr(0, length);
};
}
const phonetic = { generate };
module.exports = phonetic;