rx.disposable

0.0.1 • Public • Published

rx.disposable - RxJS Disposable class

The Reactive Extensions for JavaScript (RxJS) Disposable object.

Documentation

Disposable Members


Disposable.create(action)

# [Ⓣ][1]

Creates a new instance of the SingleAssignmentDisposable class.

Example

var Disposable = require('rx-disposable')
 
// Create the instance
var s = Disposable.create(function () {
  console.log('disposed');
});
 
s.dispose();
// => disposed
 
s.dispose();

Disposable.empty

# [Ⓣ][1]

Gets the disposable that does nothing when disposed.

Returns

(Disposable): A disposable which does nothing when disposed.

Example

var Disposable = require('rx-disposable')
 
var empty = Disposable.empty;
 
empty.dispose();

Disposable.prototype.dispose()

# [Ⓣ][1]

Unsubscribes from the underlying disposable.

Example

var Disposable = require('rx.disposable')
 
// Create the instance
var s = Disposable.create(function () {
  console.log('disposed');
});
 
s.dispose();
// => disposed
 
s.dispose();

Installation

Using npm:

npm rx.disposable

License

Copyright (c) Microsoft All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Readme

Keywords

Package Sidebar

Install

npm i rx.disposable

Weekly Downloads

2

Version

0.0.1

License

none

Last publish

Collaborators

  • mattpodwysocki