CSCfi / CSCfi/rems

Unify parsing of integers

Open
#2,372 0 comments 0 reactions 0 assignees View on GitHub
Hacktoberfest Investigate Technical Debt
Dominant language
Clojure
Stars
66
Forks
28
Avg merge
7d 4h
Merged PRs (30d)
2

Description

In the source code we seem to have references to
- regular JavaScript `parseInt` or `js/parseInt`,
- `goog.string` provided `parseInt`,
- `java.lang.Integer/parseInt` and
- our own `parse-int` that tries to do the sensible thing in each language.
- Furthermore we have `parse-int-maybe`

We can do better:
- [ ] investigate how to clean this up
- [ ] create a new task with details or if seems straightforward just fix them all
- [ ] write a unit test that tests both implementations (in the util file likely)

See for example https://github.com/CSCfi/rems/blob/master/src/cljs/rems/administration/create_form.cljs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.