1.2.0 • Published 7 years ago

easy-accounts v1.2.0

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Easy-Accounts

A simple nodejs module for account management.

Installation

To install, use npm's package manager in the command line:

npm install easy-accounts

Next, put this at the top of your code to include this package:

var accounts = require("easy-accounts");

Some example code:

accounts.createUser("TestUser", "password1234");
myuser = accounts.getUserByName("TestUser");
console.log(myuser.password); // ouput is 'password1234'

// auto-save is enabled by default, saves every minute
accounts.turnOffAutoSave();
accounts.turnOnAutoSave();

// manual saving
accounts.save("accounts.data");

// for editing users, use accounts.users
for (var i = 0; i < accounts.users.length; i++) {
    var user = accounts.users[i];
    // add arbitrary attributes to users, for example 'elevation'
    if (user.username == "TestUser") {
      user.attr['elevation'] = "Admin";
    }
}
1.2.0

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago