Skip to content
New issue

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

Missing cljs.core functions: array?, object?, js-delete #115

Closed
kanaka opened this issue Jan 13, 2022 · 4 comments
Closed

Missing cljs.core functions: array?, object?, js-delete #115

kanaka opened this issue Jan 13, 2022 · 4 comments

Comments

@kanaka
Copy link

kanaka commented Jan 13, 2022

version

0.1.0

platform

Ubuntu 20.04.3

problem

A few cljs.core interop functions are missing (that are present in cljs 1.10.758): array?, object?, js-delete, undefined?.

repro

user=> (array? #js [])
"#error {:message \"Could not resolve symbol: array?\", ...}"
user=> (object? #js {})
"#error {:message \"Could not resolve symbol: object?\", ...}"
user=> (def a #js {:foo 1 :bar 2})
#'user/a
user=> (js-delete a "foo")
"#error {:message \"Could not resolve symbol: js-delete\", ...}"
user=> a
#js {:foo 1, :bar 2}
user=> (undefined? (aget {} "x"))
"#error {:message \"Could not resolve symbol: undefined?\", ...}"

expected behavior

cljs.user=> (array? #js [])
true
cljs.user=> (object? #js {})
true
cljs.user=> (def a #js {:foo 1 :bar 2})
#'cljs.user/a
cljs.user=> (js-delete a "foo")
true
cljs.user=> a
#js {:bar 2}
cljs.user=> (undefined? (aget {} "x"))
true
@kanaka
Copy link
Author

kanaka commented Jan 13, 2022

Found another one: undefined? (I've updated original post)

@kanaka kanaka changed the title Missing core functions: array?, object?, js-delete Missing cljs.core functions: array?, object?, js-delete Jan 13, 2022
@borkdude
Copy link
Collaborator

Will be available on NPM as v0.1.1 in a minute or 10.

@borkdude
Copy link
Collaborator

It's already there!

@borkdude
Copy link
Collaborator

$ nbb
user=> (undefined? js/undefined)
true
user=> (doto #js {:a 1 :b 2} (js-delete "a"))
#js {:b 2}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants