js-on-sx: object literal spread {...src}
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 31s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 31s
This commit is contained in:
@@ -482,14 +482,21 @@
|
||||
(map
|
||||
(fn
|
||||
(entry)
|
||||
(list
|
||||
(js-sym "js-obj-set!")
|
||||
(js-sym "_obj")
|
||||
(if
|
||||
(contains? (keys entry) :computed-key)
|
||||
(list (js-sym "js-to-string") (js-transpile (get entry :computed-key)))
|
||||
(get entry :key))
|
||||
(js-transpile (get entry :value))))
|
||||
(cond
|
||||
((contains? (keys entry) :spread)
|
||||
(list
|
||||
(js-sym "js-obj-spread!")
|
||||
(js-sym "_obj")
|
||||
(js-transpile (get entry :spread))))
|
||||
(else
|
||||
(list
|
||||
(js-sym "js-obj-set!")
|
||||
(js-sym "_obj")
|
||||
(if
|
||||
(contains? (keys entry) :computed-key)
|
||||
(list (js-sym "js-to-string") (js-transpile (get entry :computed-key)))
|
||||
(get entry :key))
|
||||
(js-transpile (get entry :value))))))
|
||||
entries)
|
||||
(list (js-sym "_obj")))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user