Skip to content

Commit 3210f19

Browse files
committed
Upgrading to es2018
1 parent 4db6efc commit 3210f19

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fromit",
33
"private": false,
4-
"version": "2.1.1",
4+
"version": "2.2.0",
55
"description": "Typescript linq",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",

src/async.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
type Selector<T, M = any> = (item: T, index: number) => PromiseLike<M> | M;
33
type Matcher<T> = (item: T) => PromiseLike<boolean> | boolean
44
type Property<T> = keyof T;
5-
const identity: Matcher<any> = x => !!x;
5+
const truthy: Matcher<any> = x => !!x;
66
type FlatElement<Arr, Depth extends number> = {
77
"done": Arr,
88
"recur": Arr extends AsyncIterable<infer InnerArr>
@@ -63,7 +63,7 @@ export abstract class AEnumerable<T> implements AsyncIterable<T> {
6363
}
6464

6565
filter(matcher?: Matcher<T>): AEnumerable<T> {
66-
return new Filter(this, matcher ?? identity);
66+
return new Filter(this, matcher ?? truthy);
6767
}
6868

6969
skip(size: number): AEnumerable<T> {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
/* Basic Options */
44
// "incremental": true, /* Enable incremental compilation */
5-
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
5+
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
66
"module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
77
// "lib": [], /* Specify library files to be included in the compilation. */
88
// "allowJs": true, /* Allow javascript files to be compiled. */

0 commit comments

Comments
 (0)