1.0.8 • Published 3 years ago
user-class v1.0.8
��# User Class
Create a user object
Installation
npm i user-class
Usage
const User = require("user-class")
const Bob = new User("Bob", "Smith", 23124, 20)
Documentation
Create user
const Bob = new User("Bob", "Smith", 23124, 20)
Get first name | Returns a string
Bob.getFirstName() // Returns "Bob"
Get last name | Returns a string
Bob.getLastName() // Returns "Smith"
Get full name | Returns a string
Bob.getLastName() // Returns "Bob Smith"
Get id | Returns a number
Bob.getId() // Returns 23124
Get age | Returns a number
Bob.getAge() // Returns 20
Get user object
Bob.getUserObject() // Returns 20
Returns an object
{
firstName: 'Bob',
lastName: 'Bob',
fullName: 'Bob Bob',
id: 214134,
age: 20
}