From 2862a5849fea097fb0f91ce73f8db83ed016ca51 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 5 Aug 2012 00:29:18 -0700 Subject: [PATCH] Document how `_.each`, `_.forIn`, and `_.forOwn` may terminate iteration early by explicitly returning `false` in the `callback`. Former-commit-id: e218eae83de880deecf1e45d32ca019efd25b548 --- lodash.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 983a639f9..7281021cc 100644 --- a/lodash.js +++ b/lodash.js @@ -1042,7 +1042,8 @@ /** * Iterates over `object`'s own and inherited enumerable properties, executing * the `callback` for each property. The `callback` is bound to `thisArg` and - * invoked with 3 arguments; (value, key, object). + * invoked with 3 arguments; (value, key, object). Callbacks may terminate + * iteration early by explicitly returning `false`. * * @static * @memberOf _ @@ -1073,7 +1074,8 @@ /** * Iterates over `object`'s own enumerable properties, executing the `callback` * for each property. The `callback` is bound to `thisArg` and invoked with 3 - * arguments; (value, key, object). + * arguments; (value, key, object). Callbacks may terminate iteration early by + * explicitly returning `false`. * * @static * @memberOf _ @@ -1858,7 +1860,8 @@ /** * Iterates over a `collection`, executing the `callback` for each element in * the `collection`. The `callback` is bound to `thisArg` and invoked with 3 - * arguments; (value, index|key, collection). + * arguments; (value, index|key, collection). Callbacks may terminate iteration + * early by explicitly returning `false`. * * @static * @memberOf _