funciontallibrary

0.0.1 • Public • Published

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 },
];

Package Sidebar

Install

npm i funciontallibrary

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

7.86 kB

Total Files

21

Last publish

Collaborators

  • josejuan81