secret-santa-subjects
v1.0.3
Published
Secret Santa with subject of delivery
Downloads
3
Readme
secret-santa
How to use?
- Install SescretSanta
$ npm i --save secret-santa-subjects
- Import SecretSanta
$ import { SecretSanta } from 'secret-santa-subjects';
- Create SecretSanta objet
$ /**
$ * Both arrays in parameters should have same size or _subjects can be undefined
$ * @param {Array} _namesWithEmails
$ * @param {Array} _subjects
$ */
$ const Santa = new SecretSanta(
$ [{name: 'Ania', email: '[email protected]'}, {name: 'Adam', email: '[email protected]'}],
$ ['Cats', 'Dogs']
$ );
- Test your Santa
$ Santa.test()
- Send your Santa email
$ /**
$ * Attention! you need to enable not safe application in your gmail account
$ * @param {string} sender - it should be your gmail email
$ * @param {string} password - it should be your gmail password
$ */
$Santa.send(process.env.EMAIL, process.env.PASSWORD);