Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: immutadot
node v10.24.1
endpoint
share
tweet
const { flow, set, push } = require('immutadot') const person = { name: 'Steven', cities: ['Berlin', 'Lisbon'], currentCity: 'Berlin' } const movedIntoNewCity = flow( push('cities', 'Amsterdam'), set('currentCity', 'Amsterdam') )(person); console.log(movedIntoNewCity)
Created from: https://npm.runkit.com/immutadot
Loading…
Clone and edit this document