Skip to content

Commit

Permalink
Fixed prefixWith
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryjappinen committed Jun 23, 2024
1 parent 9dfc6a6 commit 2a3fc71
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bonn",
"version": "0.10.2",
"version": "0.10.3",
"description": "Utility, style and component library for web development.",
"private": false,
"files": [
Expand Down
2 changes: 1 addition & 1 deletion spec/utils/prefixWith.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import prefixWith from '../../utils/prefixWith'

describe.concurrent('prefixWith', () => {
it('should add suffix', () => {
expect(prefixWith('foo', '/')).toEqual('foo/')
expect(prefixWith('foo', '/')).toEqual('/foo')
expect(prefixWith('', '/')).toEqual('/')
})

Expand Down
2 changes: 1 addition & 1 deletion utils/prefixWith.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default (string, prefix, keepDuplicates) => {
return string
}

return string + prefix
return prefix + string
}

return string
Expand Down

0 comments on commit 2a3fc71

Please sign in to comment.