npm.io
1.28.0 • Published 1 year ago

user-manager

Licence
ISC
Version
1.28.0
Deps
1
Size
36 kB
Vulns
0
Weekly
0

user-manager

Simple user manager for the people.

Creating the data store


const userManager = new UserManager({storeLocation: '~/Tests/user-manager-store/',});

Adding Alice


await userManager.userAdd('alice', {password:'hunter2', notes:[`${new Date()}: Account Creation`]});

Adding (Upserting) a Note to Alice's Account


let alice = await userManager.userGet('alice');
alice.notes.push(`${new Date()}: Customer called tech-support on Christmas Day, said "Cats are little people" and hung up.`);
await userManager.userSet(alice);

Account Modification, Adding a Field.


await userManager.userMod('alice', {email:'alice@example.com'});

LICENSE

GPLv3