We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assign
Object.assign
Object.assign({}, foo, bar)
the Js.Obj module could have a function that does this. e.g.:
Js.Obj
external assignImm : (_[@mel.as {json|{}|json}]) -> < .. > Js.t -> < .. > Js.t -> < .. > Js.t = "Object.assign" let () = Js.log (assignImm [%mel.obj { foo = 1 }] [%mel.obj { bar = 2 }])
$ melc -ppx melppx x.ml // Generated by Melange 'use strict'; console.log(Object.assign({}, { foo: 1 }, { bar: 2 })); /* Not a pure module */
The text was updated successfully, but these errors were encountered:
May I suggest the name Js.Obj.merge
Js.Obj.merge
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Object.assign
is mutableObject.assign({}, foo, bar)
to create a new objectthe
Js.Obj
module could have a function that does this. e.g.:The text was updated successfully, but these errors were encountered: