mirror of https://github.com/keeweb/keeweb.git
moved phonetic export
This commit is contained in:
parent
2688e761ba
commit
556c5dd56a
|
@ -303,7 +303,7 @@ function postProcess(wordObj) {
|
||||||
* @param {*} [options] A collection of options to control the word generator.
|
* @param {*} [options] A collection of options to control the word generator.
|
||||||
* @returns {string} A generated word.
|
* @returns {string} A generated word.
|
||||||
*/
|
*/
|
||||||
module.exports.generate = function(options) {
|
function generate(options) {
|
||||||
options = getOptions(options);
|
options = getOptions(options);
|
||||||
const length = options.length;
|
const length = options.length;
|
||||||
const wordObj = {
|
const wordObj = {
|
||||||
|
@ -316,4 +316,8 @@ module.exports.generate = function(options) {
|
||||||
addSyllable(wordObj);
|
addSyllable(wordObj);
|
||||||
}
|
}
|
||||||
return postProcess(wordObj).substr(0, length);
|
return postProcess(wordObj).substr(0, length);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
const phonetic = { generate };
|
||||||
|
|
||||||
|
module.exports = phonetic;
|
||||||
|
|
Loading…
Reference in New Issue