diff --git a/rxjs-docs b/rxjs-docs deleted file mode 160000 index 5059b48c..00000000 --- a/rxjs-docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5059b48c083853b48eeabdc2272c56edf4e2443b diff --git a/src/operator-docs/conditional/every.ts b/src/operator-docs/conditional/every.ts index 7e767e41..1c5bc4a8 100644 --- a/src/operator-docs/conditional/every.ts +++ b/src/operator-docs/conditional/every.ts @@ -1,6 +1,59 @@ import { OperatorDoc } from '../operator.model'; export const every: OperatorDoc = { - 'name': 'every', - 'operatorType': 'conditional' + name: 'every', + operatorType: 'conditional', + signature: 'public every(predicate: function, thisArg: any): Observable', + parameters: [ + { + name: 'predicate', + type: 'function', + attribute: '', + description: + 'A function for determining if an item meets a specified condition.' + }, + { + name: 'thisArg', + type: 'any', + attribute: 'optional', + description: `Optional object to use for 'this' in the callback.` + } + ], + shortDescription: { + description: + 'Returns an Observable that emits whether or not every item of the source satisfies the condition specified.' + }, + walkthrough: { + description: ` +

Each value from source, pass predicate returns true otherwise false.

+ ` + }, + examples: [ + { + name: + 'A simple example emitting true if all elements are less than 5, false otherwise', + code: ` + import { every } from 'rxjs/operators'; + import { of } from 'rxjs/observable/of'; + + const source = of(1, 2, 3, 4, 5, 6); + const result = source.pipe( + //is each valule lesser than 5? + every(x => x < 5) + ); + const subscription = result.subscribe(x => console.log(x)); + + /* + Example console output + false + */ + `, + externalLink: { + platform: 'JSBin', + url: 'http://jsbin.com/watafir/embed?js,console' + } + } + ], + relatedOperators: [], + additionalResources: [] };