MCPcopy Index your code
hub / github.com/Klerith/node-intro-javascript / getEmpleado

Function getEmpleado

async-await.js:27–38  ·  view source on GitHub ↗
( id )

Source from the content-addressed store, hash-verified

25];
26
27const getEmpleado = ( id ) => {
28
29
30 return new Promise(( resolve, reject ) => {
31
32 const empleado = empleados.find( e => e.id === id )?.nombre;
33
34 ( empleado )
35 ? resolve( empleado )
36 : reject( `No existe empleado con id ${ id }` );
37 });
38}
39
40const getSalario = () => {
41 return new Promise(( resolve, reject ) => {

Callers 1

getInfoUsuarioFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected