@yino/core
v0.0.13
Published
Yino is a **ultimate workflow** for building solid projects in a more smart & effective way **All In JS**. And this package (Yino Core) is a client running in browser that supports a bunch of features, currently contains:
Downloads
43
Readme
Yino Core
Yino is a ultimate workflow for building solid projects in a more smart & effective way All In JS. And this package (Yino Core) is a client running in browser that supports a bunch of features, currently contains:
- Lambda: invoke remote functions(just like calling local async functions)
- Event: send events to analyse app usage
- Storage: upload & persist files remotely
Install
npm i @yino/core -S
You can instantiate Yino client this way:
import Yino from '@yino/core';
const y = new Yino({ id: 8851 });
And then enjoy the magic of the y
!
Invoke Remote Function
const res = await y.invoke('fetchFeed', { offset });
// make use of res...
As you can see, calling remote functions just as simple as calling local functions, once you have declared functions in Yino Lambda, you can just call it immediately.
Send Event
y.log('launch', { duration });
Once you have declared the event name & params, there's nothing to worry about, sending event is direct and intuitive.
Upload File
const { url } = await y.upload(file);
// make use of url