{"id":13515666,"url":"https://github.com/binjospookie/spacing-helper","last_synced_at":"2026-01-23T01:43:16.864Z","repository":{"id":37714255,"uuid":"220649197","full_name":"binjospookie/spacing-helper","owner":"binjospookie","description":"A tiny (117 bytes) and blazing fast standalone helper for creating consistent spacing between the elements of your UI","archived":false,"fork":false,"pushed_at":"2025-12-26T02:00:47.000Z","size":1980,"stargazers_count":47,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-26T22:39:14.674Z","etag":null,"topics":["cssinjs","emotion","helper","spacing","styled-components","tiny","ui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binjospookie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-09T13:51:56.000Z","updated_at":"2025-12-25T09:40:16.000Z","dependencies_parsed_at":"2024-11-01T19:32:26.786Z","dependency_job_id":"a594dd8a-5957-4854-9e92-2037e51fba4b","html_url":"https://github.com/binjospookie/spacing-helper","commit_stats":{"total_commits":379,"total_committers":5,"mean_commits":75.8,"dds":0.5910290237467019,"last_synced_commit":"b2ece93c12b88cf0d2119fa101c5e13976a4a650"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/binjospookie/spacing-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binjospookie%2Fspacing-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binjospookie%2Fspacing-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binjospookie%2Fspacing-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binjospookie%2Fspacing-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binjospookie","download_url":"https://codeload.github.com/binjospookie/spacing-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binjospookie%2Fspacing-helper/sbom","scorecard":{"id":238821,"data":{"date":"2025-08-11","repo":{"name":"github.com/binjospookie/spacing-helper","commit":"3fa1a2f02363b9033112aeaa15f515a2ced1d1a4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/binjospookie/spacing-helper/publish.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T06:14:56.547Z","repository_id":37714255,"created_at":"2025-08-17T06:14:56.547Z","updated_at":"2025-08-17T06:14:56.547Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cssinjs","emotion","helper","spacing","styled-components","tiny","ui"],"created_at":"2024-08-01T05:01:14.489Z","updated_at":"2026-01-23T01:43:16.849Z","avatar_url":"https://github.com/binjospookie.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Spacing-helper\n\nA tiny (117 bytes) and blazing fast standalone helper for creating consistent spacing between the elements of your UI.\n\n```js\nimport { createSpacing } from 'spacing-helper';\nconst spacing = createSpacing({ factor: 8 }); // 8 is default scaling factor\nspacing(1,2,3,4); // '8px 16px 24px 32px'\n```\n\n## Installation\n`npm i spacing-helper` or `yarn add spacing-helper`\n\n## Motivation\n\nLet's see some code\n\n```js\nconst HeaderStyled = styled.header`\n    margin: 16px 24px;\n    ...\n`;\n```\n\nMake it consistent\n\n```js\nconst MODULE = 8;\n\nconst HeaderStyled = styled.header`\n    margin: ${MODULE * 2}px ${MODULE * 3}px;\n    ...\n`;\n```\n\nMake it pretty\n\n```js\nconst HeaderStyled = styled.header`\n    margin: ${spacing(2)} ${spacing(3)};\n    ...\n`;\n```\n\nAnd...\n\n```js\nconst HeaderStyled = styled.header`\n    margin: ${spacing(2, 3)};\n    ...\n`;\n```\n\n## More examples\n```js\nconst spacing = createSpacing({ factor: 8 });\n\nexpect(spacing()).toBe('8px');\nexpect(spacing(2)).toBe('16px');\nexpect(spacing(1, 2)).toBe('8px 16px');\nexpect(spacing(1, 2, 3)).toBe('8px 16px 24px');\nexpect(spacing(1, 2, 3, 4)).toBe('8px 16px 24px 32px');\n```\n\n```js\nconst spacingFull = createSpacing({ factor: 8, units: 'rem', divisor: 100 });\n\nexpect(spacingFull(1, 2)).toBe('0.08rem 0.16rem');\nexpect(spacingFull(1, 2, 3)).toBe('0.08rem 0.16rem 0.24rem');\nexpect(spacingFull(1, 2, 3, 4)).toBe('0.08rem 0.16rem 0.24rem 0.32rem');\n```\n\n## API\n\nName | Type | Default | Description |\n------ | ------ | ------ | -----|\n`divisor` | number | 1 | divisor for multiplication result of spacing and factor |\n`factor` | number | 8 | scaling factor |\n`precision` | number | 2 | precision of divisions |\n`units` | string | \"px\" | units of transforms result (e.g. px, rem, em) |\n\n## Benchmarks\nVersion | ops/sec |\n------ | ------ |\n`v3` | 2,240,720 |\n`v4.x` | 26,891,052 |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinjospookie%2Fspacing-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinjospookie%2Fspacing-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinjospookie%2Fspacing-helper/lists"}