All Projects → channg → Zcoil

channg / Zcoil

Licence: apache-2.0
Elegant access to data

Programming Languages

typescript
32286 projects
es6
455 projects

Projects that are alternatives of or similar to Zcoil

Escape From Callback Mountain
Example Project & Guide for mastering Promises in Node/JavaScript. Feat. proposed 'Functional River' pattern
Stars: ✭ 249 (+1145%)
Mutual labels:  promise, callback
ProtoPromise
Robust and efficient library for management of asynchronous operations in C#/.Net.
Stars: ✭ 20 (+0%)
Mutual labels:  promise, callback
mongoose-aggregate-paginate-v2
A cursor based custom aggregate pagination library for Mongoose with customizable labels.
Stars: ✭ 103 (+415%)
Mutual labels:  promise, callback
Nedb Promises
A dead-simple promise wrapper for nedb.
Stars: ✭ 190 (+850%)
Mutual labels:  promise, callback
Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (+30%)
Mutual labels:  model, mvvm
Trilogy
TypeScript SQLite layer with support for both native C++ & pure JavaScript drivers.
Stars: ✭ 195 (+875%)
Mutual labels:  promise, model
lightflow
A tiny Promise-inspired control flow library for browser and Node.js.
Stars: ✭ 29 (+45%)
Mutual labels:  promise, callback
Vue Rawmodel
RawModel.js plugin for Vue.js v2. Form validation has never been easier!
Stars: ✭ 79 (+295%)
Mutual labels:  promise, model
Replace In File
A simple utility to quickly replace contents in one or more files
Stars: ✭ 369 (+1745%)
Mutual labels:  promise, callback
run exclusive
⚡🔒 Wait queue for function execution 🔒 ⚡
Stars: ✭ 22 (+10%)
Mutual labels:  promise, callback
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (+720%)
Mutual labels:  promise, callback
Thunks
A small and magical composer for all JavaScript asynchronous.
Stars: ✭ 523 (+2515%)
Mutual labels:  promise, callback
Poloniex Api Node
Poloniex API client for REST and WebSocket API
Stars: ✭ 138 (+590%)
Mutual labels:  promise, callback
Amazon Mws
Amazon MWS NodeJS Wrapper
Stars: ✭ 196 (+880%)
Mutual labels:  promise, callback
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (+485%)
Mutual labels:  promise, callback
do
Simplest way to manage asynchronicity
Stars: ✭ 33 (+65%)
Mutual labels:  promise, callback
Gollback
Go asynchronous simple function utilities, for managing execution of closures and callbacks
Stars: ✭ 55 (+175%)
Mutual labels:  promise, callback
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+520%)
Mutual labels:  model, mvvm
Westore
更好的小程序项目架构
Stars: ✭ 3,897 (+19385%)
Mutual labels:  model, mvvm
Rapid.js
An ORM-like Interface and a Router For Your API Requests
Stars: ✭ 700 (+3400%)
Mutual labels:  promise, model

zcoil

Travis Status npm license

Zcoil is a model layer framework for more convenient and elegant data manipulation

document

Currently only Chinese documents are available

中文文档

Let's start with the demo

The demo uses queues to execute methods

https://channg.github.io/zcoil/demo.html

use

install zcoil with npm

npm i zcoil

easy to use in Hello world

Instantiated object

var z = new zcoil()

initialization with param

z.init({
  data() {
    return {
      message: "hello world "
    }
  },
  asyncGetSaySomething(param) {
    return new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(param)
      }, 1000)
    })
  },
  say(param) {
    this.asyncGetSaySomething(param).then((say) => {
      this.message += "," + say
    })
  },
  endToSay(){
    this.message += ",come on "
  }
})

Magical method call process with$coil()

var hl = z.$coil().say("Thank your star this project")

hl = hl.endToSay()

hl  = hl.say("It works really well")

hl.exec((data)=>{
  data.message  //"hello world ,Thank your star this project,come on ,It works really well" 
  z.message     //"hello world ,Thank your star this project,come on ,It works really well" 
})

You can use the $watch method to get the data before the $coil method is executed

z.$watch((from,to)=>{
  console.log(from.message)
  console.log(to.message)
})

test it online

try it in jsfiddle

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].