Allow BigInt usage in templates
See original GitHub issueWhat problem does this feature solve?
It would allow us to use numbers which is larger than MAX_SAFE_INTEGER.
What does the proposed API look like?
In HTML, {{BigInt("100")}}
, {{100n}}
, {{2n * 50n}}
or {{50n + 50n}}
should show “100” (it can be just simply string by using .toString()) at frontend.
At the moment using BigInt in “Mustache” syntax just throw error.
Sure, backup solution would be using external functions or converted into string and save it to variable. But using BigInt directly in HTML would be nice to have.
More Information about BigInt -> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Using the Large Number data type - Microsoft Support
The Large Number data type stores a non-monetary, numeric value and is compatible with the SQL_BIGINT data type in ODBC. Use this data...
Read more >C++ BigIntegers and the Curiously Recurring Template ...
I'm implementing a Big Integer library where the user can choose between fixed precision or arbitrary precision integers. Since great part of ...
Read more >BIGINT Data Type | 6.3.x - Cloudera Documentation
BIGINT is a convenient type to use for column declarations because you can use any kind of integer values in INSERT statements and...
Read more >Using Templates - OpenAPI Generator
The Java generator supports a library option. This option works by defining base templates, then applying library-specific template overrides. ...
Read more >Documentation - TypeScript 3.2
BigInt. BigInts are part of an upcoming proposal in ECMAScript that allow us to model theoretically arbitrarily large integers. TypeScript 3.2 brings type- ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
BigInt could be added to the other allowed variables like Number in templates. It will only be supported by browsers supporting it though
@YanDevDe Safari 14 beta now has BigInt support.