[go: nahoru, domu]

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

Methods #57

Closed
Manikanta-20 opened this issue Jun 4, 2020 · 1 comment
Closed

Methods #57

Manikanta-20 opened this issue Jun 4, 2020 · 1 comment
Labels

Comments

@Manikanta-20
Copy link
Manikanta-20 commented Jun 4, 2020

Feature Request

Add Arthimetic,comparsion,other method which can be flexible.
Provide method like add,subtract,multiply,divide,compare,convertTo ,etc,each method certain value
Eg1:- bytes('10 gb').add('20 gb')->30gb/30

Eg2:- bytes('10 gb').add('30 gb').subtract('40 mb')->xxxxxxx.xxxx

@dougwilson
Copy link
Contributor

Thanks for the suggestion, but imo this seems overly complicated, when you can just use the existing JavaScript numeric operations +, -, *, /, etc. Your two examples would be the following:
Ex1: bytes(bytes('10 gb') + bytes('20 gb'))
Ex2: bytes(bytes('10 gb') + bytes('20 gb') - bytes('40 mb'))

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

No branches or pull requests

2 participants