Merge JavaScript objects (like [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)). Takes a target object and merges properties from one or more source objects into it, returning the modified target. ```python ob
(source, *args)
| 146 | |
| 147 | |
| 148 | def assign(source, *args): |
| 149 | """ |
| 150 | Merge JavaScript objects (like |
| 151 | [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)). |
| 152 | |
| 153 | Takes a target object and merges properties from one or more source |
| 154 | objects into it, returning the modified target. |
| 155 | |
| 156 | ```python |
| 157 | obj = js.Object.new() |
| 158 | ffi.assign(obj, {"a": 1}, {"b": 2}) |
| 159 | # obj now has properties a=1 and b=2 |
| 160 | ``` |
| 161 | """ |
| 162 | for arg in args: |
| 163 | _assign(source, to_js(arg)) |
| 164 | return source |
no test coverage detected