-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow inline of reduce
- Loading branch information
Showing
182 changed files
with
2,312 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scripts-prepend-node-path=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { every } from "../../../../inline-loops.macro"; | ||
import { every } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = every(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { everyObject } from "../../../../inline-loops.macro"; | ||
import { everyObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = everyObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { everyRight } from "../../../../inline-loops.macro"; | ||
import { everyRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = everyRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filter } from "../../../../inline-loops.macro"; | ||
import { filter } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filter(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filterObject } from "../../../../inline-loops.macro"; | ||
import { filterObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filterObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filterRight } from "../../../../inline-loops.macro"; | ||
import { filterRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filterRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { find } from "../../../../inline-loops.macro"; | ||
import { find } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = find(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findIndex } from "../../../../inline-loops.macro"; | ||
import { findIndex } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findIndex(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findIndexRight } from "../../../../inline-loops.macro"; | ||
import { findIndexRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findIndexRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findKey } from "../../../../inline-loops.macro"; | ||
import { findKey } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findKey(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findObject } from "../../../../inline-loops.macro"; | ||
import { findObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findRight } from "../../../../inline-loops.macro"; | ||
import { findRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const lastEven = findRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEach } from "../../../../inline-loops.macro"; | ||
import { forEach } from "../../../../src/inline-loops.macro"; | ||
|
||
forEach(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEachObject } from "../../../../inline-loops.macro"; | ||
import { forEachObject } from "../../../../src/inline-loops.macro"; | ||
|
||
forEachObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEachRight } from "../../../../inline-loops.macro"; | ||
import { forEachRight } from "../../../../src/inline-loops.macro"; | ||
|
||
forEachRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { map } from "../../../../inline-loops.macro"; | ||
import { map } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = map(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { mapObject } from "../../../../inline-loops.macro"; | ||
import { mapObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = mapObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { mapRight } from "../../../../inline-loops.macro"; | ||
import { mapRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = mapRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduce } from "../../../../inline-loops.macro"; | ||
import { reduce } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduce(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduce } from "../../../../inline-loops.macro"; | ||
import { reduce } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduce(array, fn, {}); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/cached/reduceObject-no-initialValue/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduceObject } from "../../../../inline-loops.macro"; | ||
import { reduceObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduceObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduceObject } from "../../../../inline-loops.macro"; | ||
import { reduceObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduceObject(object, fn, {}); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/cached/reduceRight-no-initialValue/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduceRight } from "../../../../inline-loops.macro"; | ||
import { reduceRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduceRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { reduceRight } from "../../../../inline-loops.macro"; | ||
import { reduceRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = reduceRight(array, fn, {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { some } from "../../../../inline-loops.macro"; | ||
import { some } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = some(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { someObject } from "../../../../inline-loops.macro"; | ||
import { someObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = someObject(object, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { someRight } from "../../../../inline-loops.macro"; | ||
import { someRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = someRight(array, fn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { every } from "../../../../inline-loops.macro"; | ||
import { every } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = every(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/everyObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { everyObject } from "../../../../inline-loops.macro"; | ||
import { everyObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = everyObject(object, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/everyRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { everyRight } from "../../../../inline-loops.macro"; | ||
import { everyRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAllEven = everyRight(array, value => value % 2 === 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filter } from "../../../../inline-loops.macro"; | ||
import { filter } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filter(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/filterObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filterObject } from "../../../../inline-loops.macro"; | ||
import { filterObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filterObject(object, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/filterRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { filterRight } from "../../../../inline-loops.macro"; | ||
import { filterRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const onlyEven = filterRight(array, value => value % 2 === 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { find } from "../../../../inline-loops.macro"; | ||
import { find } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = find(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/findIndex/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findIndex } from "../../../../inline-loops.macro"; | ||
import { findIndex } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findIndex(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/findIndexRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findIndexRight } from "../../../../inline-loops.macro"; | ||
import { findIndexRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findIndexRight(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/findKey/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findKey } from "../../../../inline-loops.macro"; | ||
import { findKey } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findKey(object, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/findObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findObject } from "../../../../inline-loops.macro"; | ||
import { findObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const firstEven = findObject(object, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/findRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { findRight } from "../../../../inline-loops.macro"; | ||
import { findRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const lastEven = findRight(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/forEach/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEach } from "../../../../inline-loops.macro"; | ||
import { forEach } from "../../../../src/inline-loops.macro"; | ||
|
||
forEach(array, value => console.log(value)); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/forEachObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEachObject } from "../../../../inline-loops.macro"; | ||
import { forEachObject } from "../../../../src/inline-loops.macro"; | ||
|
||
forEachObject(object, value => console.log(value)); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/forEachRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { forEachRight } from "../../../../inline-loops.macro"; | ||
import { forEachRight } from "../../../../src/inline-loops.macro"; | ||
|
||
forEachRight(array, value => console.log(value)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { map } from "../../../../inline-loops.macro"; | ||
import { map } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = map(array, value => value * 2); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/mapObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { mapObject } from "../../../../inline-loops.macro"; | ||
import { mapObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = mapObject(object, value => value * 2); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/mapRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { mapRight } from "../../../../inline-loops.macro"; | ||
import { mapRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const doubledValues = mapRight(array, value => value * 2); |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduce-no-initialValue/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduce } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduce(array, (total, value) => total + value); |
8 changes: 8 additions & 0 deletions
8
__tests__/__fixtures__/inlined-arrow-expression/reduce-no-initialValue/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let _result = array[0]; | ||
|
||
for (let _key = 1, _length = array.length, _value; _key < _length; ++_key) { | ||
_value = array[_key]; | ||
_result = _result + _value; | ||
} | ||
|
||
const sum = _result; |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduce/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduce } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduce(array, (total, value) => total + value, 0); |
8 changes: 8 additions & 0 deletions
8
__tests__/__fixtures__/inlined-arrow-expression/reduce/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let _result = 0; | ||
|
||
for (let _key = 0, _length = array.length, _value; _key < _length; ++_key) { | ||
_value = array[_key]; | ||
_result = _result + _value; | ||
} | ||
|
||
const sum = _result; |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduceObject-no-initialValue/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduceObject } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduceObject(object, (total, value) => total + value); |
17 changes: 17 additions & 0 deletions
17
__tests__/__fixtures__/inlined-arrow-expression/reduceObject-no-initialValue/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
let _hasInitialValue = false; | ||
|
||
let _value; | ||
|
||
let _result; | ||
|
||
for (let _key in object) { | ||
if (_hasInitialValue) { | ||
_value = object[_key]; | ||
_result = _result + _value; | ||
} else { | ||
_hasInitialValue = true; | ||
_result = object[_key]; | ||
} | ||
} | ||
|
||
const sum = _result; |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduceObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduceObject } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduceObject(object, (total, value) => total + value, 0); |
10 changes: 10 additions & 0 deletions
10
__tests__/__fixtures__/inlined-arrow-expression/reduceObject/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let _value; | ||
|
||
let _result = 0; | ||
|
||
for (let _key in object) { | ||
_value = object[_key]; | ||
_result = _result + _value; | ||
} | ||
|
||
const sum = _result; |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduceRight-no-initialValue/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduceRight } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduceRight(array, (total, value) => total + value); |
9 changes: 9 additions & 0 deletions
9
__tests__/__fixtures__/inlined-arrow-expression/reduceRight-no-initialValue/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const _length = array.length; | ||
let _result = array[_length - 1]; | ||
|
||
for (let _key = _length - 2, _value; _key >= 0; --_key) { | ||
_value = array[_key]; | ||
_result = _result + _value; | ||
} | ||
|
||
const sum = _result; |
3 changes: 3 additions & 0 deletions
3
__tests__/__fixtures__/inlined-arrow-expression/reduceRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduceRight } from '../../../../src/inline-loops.macro'; | ||
|
||
const sum = reduceRight(array, (total, value) => total + value, 0); |
8 changes: 8 additions & 0 deletions
8
__tests__/__fixtures__/inlined-arrow-expression/reduceRight/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let _result = 0; | ||
|
||
for (let _key = array.length - 1, _value; _key >= 0; --_key) { | ||
_value = array[_key]; | ||
_result = _result + _value; | ||
} | ||
|
||
const sum = _result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { some } from "../../../../inline-loops.macro"; | ||
import { some } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = some(array, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/someObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { someObject } from "../../../../inline-loops.macro"; | ||
import { someObject } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = someObject(object, value => value % 2 === 0); |
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-expression/someRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { someRight } from "../../../../inline-loops.macro"; | ||
import { someRight } from "../../../../src/inline-loops.macro"; | ||
|
||
const areAnyEven = someRight(array, value => value % 2 === 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-return/everyObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-return/filterObject/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-return/filterRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
__tests__/__fixtures__/inlined-arrow-return/findIndexRight/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.