Alternative StdLib for Nim for NodeJS/JavaScript targets
Documentation
✔️ Index, all in 1 page➡️ https://juancarlospaco.github.io/nodejs✔️ assert➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsassert✔️ async_hooks➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsasynchooks✔️ process➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsprocess✔️ dns➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsdns✔️ fs➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsfs✔️ inspector➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsinspector✔️ os➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsos✔️ path➡️ https://juancarlospaco.github.io/nodejs/nodejs/jspath✔️ perf_hooks➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsperfhooks✔️ punycode➡️ https://juancarlospaco.github.io/nodejs/nodejs/jspunycode✔️ querystring➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsquerystring✔️ util➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsutils✔️ v8➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsv8✔️ zlib➡️ https://juancarlospaco.github.io/nodejs/nodejs/jszlib✔️ readline➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsreadline✔️ timers➡️ https://juancarlospaco.github.io/nodejs/nodejs/jstimers✔️ repl➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsrepl✔️ url➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsurl✔️ tracing➡️ https://juancarlospaco.github.io/nodejs/nodejs/jstracing✔️ module➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsmodule✔️ domain➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsdomain✔️ diagnostics_channel➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsdiagnostics_channel✔️ wasi➡️ https://juancarlospaco.github.io/nodejs/nodejs/jswasi✔️ buffer➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsbuffer✔️ stream➡️ https://juancarlospaco.github.io/nodejs/nodejs/jstream✔️ cluster➡️ https://juancarlospaco.github.io/nodejs/nodejs/jscluster✔️ http➡️ https://juancarlospaco.github.io/nodejs/nodejs/jshttp✔️ http2➡️ https://juancarlospaco.github.io/nodejs/nodejs/jshttp2✔️ worker_threads➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsworker_threads✔️ WebSockets➡️ https://juancarlospaco.github.io/nodejs/nodejs/jswebsockets✔️ File IO API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsfilesystemhandle✔️ Battery API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsbattery✔️ USB 3.0 API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jswebusb✔️ Share API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsshare✔️ Eyedropper API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jseyedropper✔️ Speech Synthesis API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsspeechsynthesis✔️ Bluetooth API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsbluetooth✔️ Gamepad API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsgamepad✔️ GeoLocation API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsgeolocation✔️ Video Subtitles API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jswebvtt✔️ Canvas➡️ https://juancarlospaco.github.io/nodejs/nodejs/jscanvas✔️ URL Patterns➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsurlpattern✔️ WebRTC➡️ https://juancarlospaco.github.io/nodejs/nodejs/jswebrtc✔️ JS Classes➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsclasses✔️ Type-Safe DotEnv➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsdotenv✔️ Sets➡️ https://juancarlospaco.github.io/nodejs/nodejs/jssets✔️ Serializer➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsxmlserializer✔️ CRC➡️ https://juancarlospaco.github.io/nodejs/nodejs/jscrc✔️ Temporal➡️ https://juancarlospaco.github.io/nodejs/nodejs/jstemporal✔️ Chained Comparisons➡️ https://juancarlospaco.github.io/nodejs/nodejs/jschainedcomparisons✔️ Debug Utils➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsdebugutils✔️ Table Utils➡️ https://juancarlospaco.github.io/nodejs/nodejs/jstableutils✔️ Internationalization API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsintl✔️ Payments API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jspayments✔️ QR-Codes and Bar-Codes API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsbarcodes✔️ Sanitizer API➡️ https://juancarlospaco.github.io/nodejs/nodejs/jssanitizer✔️ Regex utils➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsreutils✔️ HttpClient for JavaScript➡️ https://juancarlospaco.github.io/nodejs/nodejs/jshttpclient✔️ Async HttpClient for JavaScript➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsasynchttpclient✔️ Network utils➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsnetutils✔️ Google ZX✔️ Compile-time macro-unrolled zero-overhead for loops.✔️ Compile-time zero-overhead strformat✔️ Common module➡️ https://juancarlospaco.github.io/nodejs/nodejs/jscore.html✔️ Custom syntax sugar➡️ https://juancarlospaco.github.io/nodejs/nodejs/jsugar.html- More supported modules soon...
Mobile
Client Side
- Backend in Frontend https://blog.stackblitz.com/posts/introducing-webcontainers
Single file executable
Install
nimble install nodejs
ORnimble install https://github.com/juancarlospaco/nodejs.git
Testing CI
All commits are run in CI using this matrix:
matrix:
platform: [ubuntu-latest, windows-latest]
architecture: ["x64", "x86"]
node: [12, 13, 14, 15, 16, 17]
nim-channel: [stable, devel]
Everything works from Node 12 and newer.
Design
- It does not use anything from Nim standard library, very future-proof,
just imports some types to be compatible with it, like
RegExp
, etc. - We do not deprecate stuff, even if NodeJS deprecate/remove it, it will keep working for Nim.
- Stuff deprecated/demoved before year 2020 will not be supported.
- Experimental or Unstable API on NodeJS are automatically implicitly considered Experimental here.
- Package version == NodeJS version.
Doing Python ?
See also:
- https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers#table-of-contents
- https://nim-lang.github.io/Nim/jsre.html
- https://nim-lang.github.io/Nim/jsbigints.html
Promise.then()
andPromise.catch()
work in Nim.- HTTPS Requests for JavaScript target in Nim.
- nim-lang/Nim#7505 (comment)
- nim-lang/Nim#3124 (comment)
💰 ➡️ 🍕
Bitcoin BTC
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e
BTC Bitcoin Network
1Pnf45MgGgY32X4KDNJbutnpx96E4FxqVi
Lightning Network
Ethereum ETH Dai DAI Uniswap UNI Axie Infinity AXS Smooth Love Potion SLP Uniswap UNI USDC
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e
ERC20 Ethereum Network
0xb78c4cf63274bb22f83481986157d234105ac17e
Tether USDT
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e
ERC20 Ethereum Network
0xb78c4cf63274bb22f83481986157d234105ac17e
TRC20 Tron Network
TWGft53WgWvH2mnqR8ZUXq1GD8M4gZ4Yfu
Solana SOL
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e
SOL Solana Network
FKaPSd8kTUpH7Q76d77toy1jjPGpZSxR4xbhQHyCMSGq
Cardano ADA
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e
ADA Cardano Network
DdzFFzCqrht9Y1r4Yx7ouqG9yJNWeXFt69xavLdaeXdu4cQi2yXgNWagzh52o9k9YRh3ussHnBnDrg7v7W2hSXWXfBhbo2ooUKRFMieM
Sandbox SAND Decentraland MANA
ERC20 Ethereum Network
0xb78c4cf63274bb22f83481986157d234105ac17e
Algorand ALGO
ALGO Algorand Network
WM54DHVZQIQDVTHMPOH6FEZ4U2AU3OBPGAFTHSCYWMFE7ETKCUUOYAW24Q
Polkadot DOT
DOT Network
13GdxHQbQA1K6i7Ctf781nQkhQhoVhGgUnrjn9EvcJnYWCEd
BEP20 Binance Smart Chain Network BSC
0xb78c4cf63274bb22f83481986157d234105ac17e