Skip to content

Commit 65abe20

Browse files
committed
chore: fixing linting issues
1 parent 33e290f commit 65abe20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

json-truncate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const truncate = (obj, options = {}, curDepth = 0) => {
3131
return obj
3232
} else if (Array.isArray(obj)) {
3333
const newArr = []
34-
obj.map(value => {
34+
obj.forEach(value => {
3535
if (isFlat(value)) {
3636
newArr.push(value)
3737
} else {

test/mocha.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('JSONtruncate', () => {
6060
})
6161

6262
it('should return flat objects', () => {
63-
;[5, true, false, 'hello'].map(val => {
63+
;[5, true, false, 'hello'].forEach(val => {
6464
src(val, 5).should.equal(val)
6565
})
6666
})

0 commit comments

Comments
 (0)