@freearhey/core
Advanced tools
Comparing version
{ | ||
"name": "@freearhey/core", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Toolset for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -74,6 +74,4 @@ import _ from 'lodash' | ||
forEach(iteratee: Iteratee) { | ||
for (const item of this._items) { | ||
iteratee(item) | ||
} | ||
forEach(callback: (item: any, index?: number) => void) { | ||
this._items.forEach(callback) | ||
@@ -80,0 +78,0 @@ return this |
@@ -81,4 +81,9 @@ import { Collection, Dictionary } from '../src' | ||
let output = '' | ||
collection.forEach(i => (output += i.name)) | ||
expect(output).toEqual('abc') | ||
collection.forEach(item => { | ||
output += item.name | ||
}) | ||
collection.forEach((item, index) => { | ||
output += item.name + index | ||
}) | ||
expect(output).toEqual('abca0b1c2') | ||
expect(collection).toEqual(new Collection([{ name: 'a' }, { name: 'b' }, { name: 'c' }])) | ||
@@ -85,0 +90,0 @@ }) |
60095
0.17%1817
0.17%