angular-meteor-promiser
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -74,3 +74,3 @@ "use strict"; | ||
}()); | ||
var name = 'angular-meteor.promiser'; | ||
var name = 'angular-meteor-promiser'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -77,0 +77,0 @@ exports.default = name; |
@@ -70,3 +70,3 @@ import * as angular from 'angular'; | ||
const name = 'angular-meteor.promiser'; | ||
const name = 'angular-meteor-promiser'; | ||
export default name; | ||
@@ -73,0 +73,0 @@ |
{ | ||
"name": "angular-meteor-promiser", | ||
"version": "0.2.0", | ||
"description": "Turns Meteor subscribe, call, apply callbacks into promises", | ||
"version": "1.0.0", | ||
"description": "Turns Meteor subscribe, call, apply callbacks into AngularJS promises", | ||
"main": "angular-meteor-promiser.js", | ||
"keywords": [ | ||
"AngularJS", | ||
"Meteor", | ||
"angular-meteor", | ||
"angular" | ||
], | ||
"repository": { | ||
@@ -7,0 +13,0 @@ "type": "git", |
@@ -10,5 +10,20 @@ # angular-meteor-promiser | ||
```js | ||
angular.module('app', [ | ||
'angular-meteor-promiser' | ||
]); | ||
``` | ||
### `$promiser` | ||
```js | ||
function controller($promiser) { | ||
// $promiser.subscribe | ||
// $promiser.call | ||
// $promiser.apply | ||
// $promiser.any | ||
} | ||
``` | ||
#### subscribe | ||
@@ -24,3 +39,3 @@ | ||
#### apply= | ||
#### apply | ||
@@ -40,10 +55,17 @@ Same arguments as `Meteor.apply`. | ||
$promiser.any(() => foo('sync')) | ||
$promiser.any(() => { | ||
return foo('sync'); | ||
}) | ||
.then((data) => { ... }) // 'sync' | ||
.catch((error) => { ... }); | ||
$promiser.any((done) => { | ||
setTimeout(() => { | ||
done(foo('async')) | ||
done(foo('async')); | ||
}, 500); | ||
}) | ||
@@ -50,0 +72,0 @@ .then((data) => { ... }) // 'async' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8045
0
72