Skip to content

Commit

Permalink
fix: linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lwhiteley committed Jan 11, 2017
1 parent aefee27 commit 41e5032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/json-truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const truncate = (obj, maxDepth, options, curDepth) => {
return newObj
}
}
return options.replace;
return options.replace
}

export default truncate
4 changes: 2 additions & 2 deletions test/mocha.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ const createTestsFor = (m, name) => {
})

it('should truncate arrays and nested objects with replacement string', () => {
const replacement = '[replaced]';
const replacement = '[replaced]'
m([createDeep(3, replacement)], 2, {replace: replacement}).should.deep.equal([createDeep(1, replacement)])
})

it('should replace truncated values with undefined when replace prop is not a string', () => {
const replacement = 3;
const replacement = 3
m([createDeep(3)], 2, {replace: replacement}).should.deep.equal([createDeep(1)])
})

Expand Down

0 comments on commit 41e5032

Please sign in to comment.