Skip to content

Commit

Permalink
build: bump
Browse files Browse the repository at this point in the history
  • Loading branch information
binjospookie committed Jan 4, 2021
1 parent 2217537 commit c5ba998
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Spacing-helper

A tiny (122 bytes) and blazing fast standalone helper for creating consistent spacing between the elements of your UI.
A tiny (117 bytes) and blazing fast standalone helper for creating consistent spacing between the elements of your UI.

```js
import { createSpacing } from 'spacing-helper';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spacing-helper",
"version": "4.1.1",
"version": "4.1.2",
"description": "Standalone helper for creating consistent spacing between the elements of your UI",
"source": "src/index.js",
"main": "build/index.js",
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ describe('Common tests', () => {
expect(spacingFour(1, 2)).toBe('4px 8px');
expect(spacingFour(1, 2, 3)).toBe('4px 8px 12px');
expect(spacingFour(1, 2, 3, 4)).toBe('4px 8px 12px 16px');

expect(spacingFour(1, 2, 3, 0)).toBe('4px 8px 12px 0px');
});

test('Without arguments', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const createSpacing = ({ factor = 8, divisor = 1, precision = 2, units =

res = `${res} ${transform(third)}`;

return fourth ? `${res} ${transform(fourth)}` : res;
return fourth * 0 !== 0 ? res : `${res} ${transform(fourth)}`;
};
};

0 comments on commit c5ba998

Please sign in to comment.