Help us understand the problem. What is going on with this article?

RxJS の Observable と Array との比較

More than 3 years have passed since last update.

この記事は bouzuya's RxJS Advent Calendar 2015 の 20 日目です。

はじめに

今日は ArrayObservable とを比較してみます。Array にあって Observable にないものがあるのかどうかを確認します。

Array は MDN の Array から実験的な機能を除いたものを対象にしています。

RxJS4.0.7 を対象にしています。

Array / Observable 対照表

Array Observable
Array.from Observable.from
Array.isArray Observable.isObservable Source Code
Array.prototype.concat Observable.prototype.concat
Array.prototype.every Observable.prototype.every
Array.prototype.filter Observable.prototype.filter
Array.prototype.forEach Observable.prototype.forEach
Array.prototype.indexOf Observable.prototype.indexOf
Array.prototype.join 大きく異なる Observable.prototype.join
Array.prototype.lastIndexOf Observable.prototype.lastIndexOf
Array.prototype.map Observable.prototype.map
Array.prototype.pop -
Array.prototype.push -
Array.prototype.reduce Observable.prototype.reduce
Array.prototype.reduceRight -
Array.prototype.reverse -
Array.prototype.shift -
Array.prototype.slice Observable.prototype.slice
Array.prototype.some Observable.prototype.some
Array.prototype.sort -
Array.prototype.splice -
Array.prototype.toLocaleString -
Array.prototype.toString -
Array.prototype.unshift -

おわりに

不要なもの以外はほとんど揃っていそうです。今回は列挙していませんが実験的な機能についてもある程度は揃っているようです。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away