Add js BigInts (#16409)

* Add BigInts
* Renames tos plurals
* Improve Stringifications
* Update changelog.md

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* RunnableExamplerize
* discard the discardable pragma
* Several improvements from peer reviews, more docs
* More doc, more test
* More doc, more test
* Better error message 'Error: usage of low is an {.error.} defined at jsbigints.nim' instead of just 'type mismatch JsBigInt'
* is an overload, rename
* proc to scare kids away
* Update lib/js/jsbigints.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* https://github.com/nim-lang/Nim/pull/16409#discussion_r554365041

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
Juan Carlos 2021-01-14 16:19:41 -03:00 • committed by GitHub
commit 41965880ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 237 additions and 1 deletions

View file

@ -14,8 +14,11 @@ const
webUploadOutput = "web/upload"
var nimExe*: string
const allowList = ["jsbigints.nim"]
template isJsOnly(file: string): bool = file.isRelativeTo("lib/js")
template isJsOnly(file: string): bool =
file.isRelativeTo("lib/js") or
file.extractFilename in allowList
proc exe*(f: string): string =
result = addFileExt(f, ExeExt)