aaronccasanova / aacc Goto Github PK
View Code? Open in Web Editor NEWCasa for my packages, projects, and experiments
Casa for my packages, projects, and experiments
Never gonna happen: microsoft/TypeScript#14116
Hello,
It would be nice to add the following features to cross-runtime
:
isTauri
using window.__TAURI__
;writeFile
using writeTextFile
from @tauri-apps/api/fs
;readFile
using readTextFile
from @tauri-apps/api/fs
.readLines
method for reading a file line by line :
createInterface
from node:readline
& createReadStream
from node:fs
;exec
method for running a command and returning an output :
Deno.Command().output()
;exec
from node:child_process
;$`โ`.quiet()
from bun
;new Command().execute()
from @tauri-apps/api/shell
.spawn
method for running a command and returning a stream :
Deno.Command().spawn()
;spawn
from node:child_process
;Bun.spawn()
;new Command().spawn()
from @tauri-apps/api/shell
.writeBinaryFile
method for writing binary files :
Deno.writeFile()
taking an Uint8Array
;encoding
= null
taking a Buffer
or any TypedArray
;Bun.write()
taking an ArrayBuffer
, a Blob
or any TypedArray
;writeBinaryFile
from @tauri-apps/api/fs
taking an ArrayBuffer
;readBinaryFile
method for reading binary files :
Deno.readFile()
returning an Uint8Array
;encoding
= null
returning a Buffer
;Bun.file().arrayBuffer()
returning an ArrayBuffer
;readBinaryFile
from @tauri-apps/api/fs
returning an Uint8Array
;ArrayBuffer
by default.Additionally, it would be nice to :
writeTextFile
& readTextFile
aliases for writeFile
& readFile
for consistency purposes ;Bun.file().text()
in readFile
instead of relying on Bun's Node polyfill.If you'd like, I'm willing to make a PR for everything listed here, with JS and JSDoc, but not TS though.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.