funciontallibrary
v0.0.1
Published
funciones a usar en programacion funcional
Downloads
4
Maintainers
Readme
Functional Library
Librería de funciones usadas para programación funcional.
setNewProperty
Basic
const person = {
id: 1,
name: 'Andres',
};
setNewProperty('age', 69)(person)
result: person = { id: 1, name: 'Andres', age: 69 }
in Arrays
const persons = [
{ id: 1, name: 'Andres' },
{ id: 2, name: 'Ada' },
];
const personsUpdates = persons.map(setNewProperty('age', 69))
result:
persons = [
{ id: 1, name: 'Andres', age: 69 },
{ id: 2, name: 'Ada', age: 69 },
];