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

Defining a new unit #96

Open
b-v opened this issue Jan 9, 2019 · 7 comments
Open

Defining a new unit #96

b-v opened this issue Jan 9, 2019 · 7 comments

Comments

@b-v
Copy link

b-v commented Jan 9, 2019

I was wondering whether it is possible to define a new unit as in ruby-units (Unit.define), without changing the source code (that is, the variable UNITS in definitions.js)? For example, for sporadically used units?

@phil-mitchell
Copy link

I had this need as well so I created a PR. Maybe it will be accepted?

@sanzoghenzo
Copy link
Contributor

Hi @phil-mitchell, I see that you closed the PR; can I ask you why? have you found a better solution?

@phil-mitchell
Copy link

@sanzoghenzo too much time had passed and I had forgotten what was going on and I just created my own much simpler implementation for what I needed in the meantime.

@rage-shadowman
Copy link
Contributor

Bummer... I would've like to have seen this make it in.

@MatousAc
Copy link

MatousAc commented Nov 14, 2022

@sanzoghenzo
Same. Is there some way I can stir up interest for this again?
The app I'm building needs to be able to define its own units.
I'm kinda still a junior programmer, so could I get a tip here? If no one has time to try to pull this change in, but I want to have the functionality, how to I get it in the easiest way? Should I work the changes here into my own fork of the js-quantities repo? If I did that, I'd have to make a new npm package since that is how I am using it right now, right? Or is there some easier way?

@adrfantini
Copy link

I am also interested in this implementation and might get some funding for it if there is the need for that @gentooboontoo

@MatousAc
Copy link

@adrfantini I know this doesn't solve this issue, but I needed this feature, so I used Unitmath instead.

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

Successfully merging a pull request may close this issue.

6 participants