any-observable
Advanced tools
Comparing version 0.1.1 to 0.2.0
'use strict'; | ||
module.exports = require('./register')(); | ||
module.exports = require('./register')().Observable; |
{ | ||
"name": "any-observable", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Support any Observable library and polyfill", | ||
@@ -19,3 +19,8 @@ "license": "MIT", | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"implementation.js", | ||
"loader.js", | ||
"register.js", | ||
"register-shim.js", | ||
"register" | ||
], | ||
@@ -27,9 +32,35 @@ "keywords": [ | ||
"polyfill", | ||
"any" | ||
"any", | ||
"rxjs" | ||
], | ||
"devDependencies": { | ||
"arrify": "^1.0.1", | ||
"ava": "*", | ||
"browserify": "^13.0.0", | ||
"execa": "^0.4.0", | ||
"karma": "^1.1.0", | ||
"karma-browserify": "^5.0.4", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-mocha": "^1.0.1", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"mocha": "^2.4.5", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"rxjs": "^5.0.0-beta.9", | ||
"watchify": "^3.7.0", | ||
"xo": "*", | ||
"zen-observable": "^0.2.1" | ||
"zen-observable": "^0.3.0" | ||
}, | ||
"browser": { | ||
"./register.js": "./register-shim.js" | ||
}, | ||
"xo": { | ||
"overrides": [ | ||
{ | ||
"files": "browser/tests/**", | ||
"envs": [ | ||
"mocha" | ||
] | ||
} | ||
] | ||
} | ||
} |
@@ -31,3 +31,24 @@ # any-observable [![Build Status](https://travis-ci.org/sindresorhus/any-observable.svg?branch=master)](https://travis-ci.org/sindresorhus/any-observable) | ||
## Registration Shortcuts | ||
This adds the following shortcut registrations: | ||
- `rxjs-min`: Bare bones [RxJs](https://github.com/ReactiveX/rxjs) Observable implementation. See the [RxJs Installation Instructions](http://reactivex.io/rxjs/manual/installation.html) for details on patching additional methods into that implementation. | ||
- `rxjs`: Same as `rxjs-min`, but adds the somewhat standard `Observable.of` and `Observable.from`. | ||
- `rxjs-all`: The kitchen sink approach to Observables. | ||
- `zen`: The [`zen-observable`](https://github.com/zenparsing/zen-observable) implementation. | ||
Shortcut registration can be done as follows: | ||
```js | ||
import 'any-observable/register/zen'; | ||
``` | ||
It's especially handy for more recent versions of Node.js (and many test runners), that offer a `--require` flag: | ||
``` | ||
$ ava --require=any-observable/register/zen test.js | ||
``` | ||
## Related | ||
@@ -34,0 +55,0 @@ |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
8278
12
112
62
0
15
1