sentence-maker
v1.0.10
Published
Frame a sentence by keywords.
Downloads
3
Maintainers
Readme
Frame a sentence by keywords.
Install
npm i sentence-maker
Usage
const Sentence = require('sentence-maker');
const st = new Sentence({
subject: 'Leanne Graham',
verb: 'create',
object: 'company Romaguera-Crona',
preps: { // prepositions
subject: 'from Gwenborough'
}
});
console.log(st.byTense(1)); // present continuous
// Leanne Graham from Gwenborough is creating company Romaguera-Crona
console.log(st.byTense(4)); // past simple
// Leanne Graham from Gwenborough created company Romaguera-Crona
Tenses
0 => Present simple 1 => Present continuous 2 => Present perfect 3 => Present perfect continuous 4 => Past simple 5 => Past continuous 6 => Past perfect 7 => Past perfect continuous 8 => Future simple 9 => Future continuous 10 => Future perfect 11 => Future perfect continuous