This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import withReadme from 'storybook-readme/with-readme'; | |
| import readme from './README.md'; | |
| const decorateDocs = (...documentation) => (story, context) => | |
| withReadme(documentation, () => story())(context); | |
| storiesOf(...) | |
| .addDecorator(decorateDocs(readme)) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Ceiling function for a value to nearest binary of N-terms. | |
| * For `N = 1` allows maximums such as `128`, `256`, etc. | |
| * For `N = 2` allows maximums such as `96`, `384`, etc. | |
| * | |
| * @param {number} [numTerms] Optional number of terms | |
| * @returns {function} Math.ceil for a value to nearest binary of N-terms | |
| */ | |
| const roundToBinary = (numTerms = 1) => value => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('console-log-div'); | |
| var Rx = require('rxjs'); | |
| var subject = new Rx.BehaviorSubject(undefined); | |
| var stimulus = new Rx.Subject(), | |
| countObs = Rx.Observable.never() | |
| .multicast(stimulus) | |
| .refCount() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://fb.me/react-0.13.1.js"></script> | |
| <script src="http://fb.me/react-with-addons-0.13.1.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Rx = require('rxjs'); | |
| // -------------------- A : complete then subscribe : PASS -------------------------------- | |
| // get an observable similar to how we would create a data source | |
| var stimulusA; | |
| var isDisposedA = false; | |
| var commonA = Rx.Observable.create(function (instance) { | |
| stimulusA = instance; | |
| }) | |
| var sourceA = Rx.Observable.defer(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Rx = require('rxjs'); | |
| // -------------------- A : complete then subscribe : FAIL -------------------------------- | |
| // get an observable similar to how we would create a data source | |
| var stimulusA; | |
| var sourceA = Rx.Observable.create(function (instance) { | |
| stimulusA = instance; | |
| }) | |
| .publish() | |
| .refCount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="RxJS cold behaviour subject"> | |
| <meta charset="utf-8"> | |
| <title>RxJS cold behaviour subject</title> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/q.js/1.0.1/q.js"></script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="rxjs behaviour subject"> | |
| <meta charset="utf-8"> | |
| <title>rxjs behaviour subject</title> | |
| </script> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="rxjs delayed subscriber with default"> | |
| <meta charset="utf-8"> | |
| <title>rxjs delayed subscriber with default</title> | |
| </script> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="app"> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
| <meta name="description" content="Angular 1.x RxJS test"> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.js"></script> | |
| <meta charset="utf-8"> | |
| <title>Angular 1.x RxJS test</title> |