Skip to content

Commit 4826b61

Browse files
committed
ForEach behavior
1 parent 6618f05 commit 4826b61

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ array.Where("x => x.Name == 'Max'");
3030

3131
Conclusion:
3232

33-
* Works with multiple Browsers
33+
* Works with multiple Browsers (even IE)
3434
* Angular Support (event directly in Views if using Strings as Expression-Syntax)
3535
* Lightweight
3636
* Fast

dev/Modules/ForEach.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
let actionFunction: Function = Linq4JS.Helper.ConvertFunction(action);
55

66
for (let obj of that) {
7-
actionFunction(obj);
7+
let result = actionFunction(obj);
8+
9+
if(result != null && result == true){
10+
break;
11+
}
812
}
913

1014
return that;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linq4js",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Linq methods for JavaScript/TypeScript for working with Arrays",
55
"main": "dist/Linq4JS.js",
66
"typings": "dist/Linq4JS.d.ts",

0 commit comments

Comments
 (0)