nativeScript-foaas
为 NativeScript 提供的 Foaas 包装器,非常适合用于演示,有优点也有缺点
npm i --save nativescript-foaas

NativeScript (FOAAS)

FOAAS 的 NativeScript 包装器。现在你可以使用 Promises 进行 FO 操作!

什么是 Foaas?

方法

  • 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);
});
});
});

注意

省略了一些非常冒犯性的方法...