Attributa is a node.js package that helps you to assign multiple attributes in just one line.

Problem

Did you ever have to do this?

function User(data) {
  this.username = data.username;
  this.password = data.password;
  this.address = data.address;
  this.email = data.email;
  // ...
  // After a dozen more attributes...
  this.privacySetting = data.privacySetting;
}

Solution

You can now do this instead!

function User(data) {
  attributa(this, data);
}

The installation instructions and docs can be found in the repository.