0.4.0 • Published 7 years ago
ogio v0.4.0
OG I/O... what it's all 'bout?
Install
npm i ogiorequire("ogio")Fetch!
"file.txt".g()
// => This is a textawait "@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 textawait "@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