Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

OG I/O logo

npm license


wut?

"The most dangerous js library I know"
– Data Science OG

OG I/O... what it's all 'bout?

Install

npm i ogio
require("ogio")

Fetch!

"file.txt".g()
// => This is a text
await "@file.txt".g()
// => This is the same text, but async
"file.json".g()
// => {txt: "Parsed json"}
await "https://example.com".g()
// => <html> ... </html>
await "https://example.com/file.json".g()
// => {txt: "Parsed json from example.com"}

Save!

"file.txt".s("This will be a text")
// => This will be a text
await "@file.txt".s("The same text, but async")
// => The same text, but async
"file.json".s({txt:"json smth"})
// => {
//        "txt": "json smth"
//    }

...More stuff is coming

About

Be real OG, fetch everything with g(). File and web I/O combined.

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.