Socket
Book a DemoInstallSign in
Socket

fake-users100295

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fake-users100295

my users administrator

latest
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

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

Keywords

fake

FAQs

Package last updated on 22 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.