1.1.1 • Published 6 years ago

fake-users100295 v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

fakeUsers.js

Get a fake users array with functions

Installation

npm install fake-users100295

functions

-all -byId -insert -delete -modify -reset

Usage

You can use these functions for working on a fake users array.

console.log(all()); // outputs the current array
console.log(getById(2)); // gets the element of the array with id = 2
console.log(insert(name,surname,email)); // add an element to the array giving him by input name, surname and email and adds automatically an id
console.log(delete(3)); // delete an element of the array with id = 3
console.log(modify(id,object)); // modify an element of the array by id, giving the json that contains the modifies to be made
console.log(reset()); // return to the starting array

Examples

Here an example for functions insert and modify.

console.log(insert('Mattia', 'Parisi', 'mattiaparisi@gmail.com'));
console.log(modify(2,{name :'Mattia',surname : 'Parisi',email : 'mattiaparisi@gmail.com'}));

Author

Mattia Parisi

1.1.1

6 years ago

1.1.0

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago