Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 4b6406c

Browse files
committed
rename 'contains' operator to includes operator
1 parent 9dba472 commit 4b6406c

27 files changed

Lines changed: 129 additions & 83 deletions

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ var browsers = [{
178178
'src/core/linq/observable/some.js', // where
179179
'src/core/linq/observable/isempty.js', // any, select
180180
'src/core/linq/observable/every.js', // where, any
181-
'src/core/linq/observable/contains.js', // where, any
181+
'src/core/linq/observable/includes.js', // where, any
182182
'src/core/linq/observable/count.js', // where, aggregate
183183
'src/core/linq/observable/indexof.js',
184184
'src/core/linq/observable/sum.js', // select, aggregate
@@ -465,7 +465,7 @@ var browsers = [{
465465
'src/core/linq/observable/some.js', // where
466466
'src/core/linq/observable/isempty.js', // any, select
467467
'src/core/linq/observable/every.js', // where, any
468-
'src/core/linq/observable/contains.js', // where, any
468+
'src/core/linq/observable/includes.js', // where, any
469469
'src/core/linq/observable/count.js', // where, aggregate
470470
'src/core/linq/observable/indexof.js',
471471
'src/core/linq/observable/sum.js', // select, aggregate
@@ -1298,7 +1298,7 @@ var browsers = [{
12981298
'src/core/linq/observable/some.js', // where
12991299
'src/core/linq/observable/isempty.js', // any, select
13001300
'src/core/linq/observable/every.js', // where, any
1301-
'src/core/linq/observable/contains.js', // where, any
1301+
'src/core/linq/observable/includes.js', // where, any
13021302
'src/core/linq/observable/count.js', // where, aggregate
13031303
'src/core/linq/observable/indexof.js',
13041304
'src/core/linq/observable/sum.js', // select, aggregate

dist/rx.aggregates.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@
234234
};
235235

236236
/**
237-
* Determines whether an observable sequence contains a specified element with an optional equality comparer.
237+
* Determines whether an observable sequence includes a specified element with an optional equality comparer.
238238
* @param searchElement The value to locate in the source sequence.
239239
* @param {Number} [fromIndex] An equality comparer to compare elements.
240-
* @returns {Observable} An observable sequence containing a single element determining whether the source sequence contains an element that has the specified value from the given index.
240+
* @returns {Observable} An observable sequence containing a single element determining whether the source sequence includes an element that has the specified value from the given index.
241241
*/
242-
observableProto.contains = function (searchElement, fromIndex) {
242+
observableProto.includes = function (searchElement, fromIndex) {
243243
var source = this;
244244
function comparer(a, b) {
245245
return (a === 0 && b === 0) || (a === b || (isNaN(a) && isNaN(b)));
@@ -267,6 +267,13 @@
267267
}, this);
268268
};
269269

270+
/**
271+
* @deprecated use #includes instead.
272+
*/
273+
observableProto.contains = function (searchElement, fromIndex) {
274+
//deprecate('contains', 'includes');
275+
observableProto.includes(searchElement, fromIndex);
276+
};
270277
/**
271278
* Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items.
272279
* @example

dist/rx.aggregates.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rx.aggregates.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)