MCPcopy Create free account
hub / github.com/Klerith/node-intro-javascript / getSalario

Function getSalario

async-await.js:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40const getSalario = () => {
41 return new Promise(( resolve, reject ) => {
42
43 const salario = salarios.find( s => s.id === id )?.salario;
44
45 ( salario )
46 ? resolve( salario )
47 : reject( `No existe salario con id ${ id }` );
48 });
49}
50
51
52const getInfoUsuario = async( id ) => {

Callers 1

getInfoUsuarioFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected