can-define-stream-rxjs

0.2.3 • Public • Published

can-define-stream-rxjs

Build Status

Define properties with streams on can-define types.

Syntax

canDefineStreamRxjs([DefineMap])

Example

var canDefineStreamRx = require('can-define-stream-rxjs');

var MyMap = DefineMap.extend({
	foo: 'string',
	bar: { type: 'string', value: 'bar' },
	baz: {
	  type: 'string',
	    stream: function( stream ) {
	      var fooStream = this.stream('.foo');
	      var barStream = this.stream('.bar');
	      return stream.merge(fooStream).merge(barStream);
	    }
	}
});

canDefineStreamRx(MyMap);

Testing

npm test

Package Sidebar

Install

npm i can-define-stream-rxjs

Weekly Downloads

1

Version

0.2.3

License

MIT

Last publish

Collaborators

  • webmech