npm i --save nativescript-foaas
- 版本:1.0.5
- GitHub: https://github.com/sitefinitysteve/nativescript-foaas
- NPM: https://npmjs.net.cn/package/nativescript-foaas
- 下载量
- 昨天: 0
- 上周: 0
- 上个月: 0
NativeScript (FOAAS)
FOAAS 的 NativeScript 包装器。现在你可以使用 Promises 进行 FO 操作!
方法
- off(name, from);
- you(name, from);
- this(from);
- that(from);
- everything(from);
- everyone(from);
- donut(name, from);
- shakespeare(name, from);
- linus(name, from);
- king(name, from);
- pink(from);
- life(from);
- outside(name, from);
- thing(thing, from);
- thanks(from);
- flying(from);
- fascinating(from);
- madison(name, from);
- cool(from); 别名 coolstorybro
- field(name, from, reference);
- nugget(name, from);
- yoda(name, from);
- ballmer(name, company, from);
- what(from);
- because(from);
- caniuse(tool, from);
- bye(from);
- bus(name, from);
- bday(name, from);
- awesome(from);
- tucker(from); 别名 comein
- bucket(from);
- family(from);
- shutup(name, from);
- keepcalm(reaction, from);
- dosomething(blank, theThing, from);
用法
所有方法都返回 Promises
var foaas = require("nativescript-foaas");
//Promise return
/*args: {
message: "Cool story, bro.",
subtitle: "- nativescript",
combined: "Cool story, bro. - nativescript"
}
*/
//Simple
foaas.coolstorybro("nativescript").then(function(args){
alert(args.combined);
});
//Nested Chain
foaas.coolstorybro("nativescript").then(function(args){
//Alert Message
alert(args.message).then(function(){
//Call the next once it's closed
foaas.bye("nativescript").then(function(args){
alert(args.combined);
});
});
});
注意
省略了一些非常冒犯性的方法...