{"id":20497212,"url":"https://github.com/alexcambose/css-func","last_synced_at":"2026-04-14T10:31:12.917Z","repository":{"id":95848823,"uuid":"163620061","full_name":"alexcambose/css-func","owner":"alexcambose","description":"Handle CSS style functions with no worries","archived":false,"fork":false,"pushed_at":"2018-12-31T13:52:56.000Z","size":10,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T05:19:54.408Z","etag":null,"topics":["attributes","browser","css","helper","html","javascript","javascript-library","npm","programatically","style","transform","ux"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/css-func","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/alexcambose.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}},"created_at":"2018-12-30T21:52:19.000Z","updated_at":"2023-08-18T15:18:21.000Z","dependencies_parsed_at":"2023-04-27T20:01:06.920Z","dependency_job_id":null,"html_url":"https://github.com/alexcambose/css-func","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"330b60c70e5ba23d468b49e9bbb178bcc0a97d62"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexcambose/css-func","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcambose%2Fcss-func","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcambose%2Fcss-func/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcambose%2Fcss-func/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcambose%2Fcss-func/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexcambose","download_url":"https://codeload.github.com/alexcambose/css-func/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexcambose%2Fcss-func/sbom","scorecard":{"id":180951,"data":{"date":"2025-08-11","repo":{"name":"github.com/alexcambose/css-func","commit":"330b60c70e5ba23d468b49e9bbb178bcc0a97d62"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/7 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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"}}]},"last_synced_at":"2025-08-16T18:52:13.383Z","repository_id":95848823,"created_at":"2025-08-16T18:52:13.383Z","updated_at":"2025-08-16T18:52:13.383Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"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":["attributes","browser","css","helper","html","javascript","javascript-library","npm","programatically","style","transform","ux"],"created_at":"2024-11-15T18:10:23.704Z","updated_at":"2026-04-14T10:31:12.898Z","avatar_url":"https://github.com/alexcambose.png","language":"JavaScript","readme":"# css-func\n\nHandle CSS style functions with no worries.\n\n[![Build Status](https://travis-ci.org/alexcambose/css-func.svg?branch=master)](https://travis-ci.org/alexcambose/css-func)\n[![Coverage Status](https://coveralls.io/repos/github/alexcambose/css-func/badge.svg?branch=master)](https://coveralls.io/github/alexcambose/css-func?branch=master)\n![License](https://img.shields.io/github/license/alexcambose/css-func.svg)\n\n## Install\n\n```bash\nnpm i -S css-func\n```\n\n## Usage\n\nExamples on how it can be used\n\n```js\nconst cssfunc = require('css-func');\n\n// get dom element\nconst element = document.getElementById('#element');\n\n// different ways to specify function parameters\ncssfunc(element, 'transform').add('translate', '10px'); // \"translate(10px)\"\ncssfunc(element, 'transform').add('translate', ['10px']); // \"translate(10px)\"\ncssfunc(element, 'transform').add('translate', ['10px', '20px']); //  \"translate(10px, 20px)\"\n\ncssfunc(element, 'transform').add('rotate', '20deg'); // \"rotate(20deg)\"\n\nconsole.log(element.style.transform); // \"translate(10px, 20px) rotate(20deg)\"\n```\n\nCustom variable that holds the `cssfunc` instance\n\n```js\nconst filters = cssfunc(element, 'filter');\nfilters.add('blur', '10px');\nfilters.add('grayscale', '100%');\n\nfilters.update('blur', '20px');\nfilters.delete('blur');\n\nfilters.exists('blur'); // false\n\nfilters.get(); // \"grayscale(100%)\"\n```\n\n## API\n\n#### get()\n\nGets the property from element\n\n##### Examples\n\n```javascript\ncssfunc(element, 'transform').get(); // \"translate(10px, 20px) scale(1.1)\"\n```\n\n##### Returns\n\n- `string` Element property value\n\n#### add(fproperty, value[, autoUpdate\u0026#x3D;true])\n\nAdds or updates a function\n\n##### Parameters\n\n| Name                 | Type             | Description                                                                                                  |            |\n| -------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------ | ---------- |\n| fproperty            | `string`         | CSS function name                                                                                            | \u0026nbsp;     |\n| value                | `string` `array` | CSS function parameters                                                                                      | \u0026nbsp;     |\n| autoUpdate\u0026#x3D;true | `boolean`        | True to automatically update function if aleady presentTrue to automatically add new function if not present | _Optional_ |\n\n##### Examples\n\n```javascript\ncssfunc(element, 'transform').add('rotate', '10px');\ncssfunc(element, 'transform').add('translate', ['10px', '20px']);\ncssfunc(element, 'transform').add('translateX', ['10px']);\n```\n\n##### Returns\n\n- `boolean` True if a function was added or updated\n\n#### update(fproperty, value[, autoAdd\u0026#x3D;true])\n\nUpdates or adds a function\n\n##### Parameters\n\n| Name              | Type             | Description                                           |            |\n| ----------------- | ---------------- | ----------------------------------------------------- | ---------- |\n| fproperty         | `string`         | CSS function name                                     | \u0026nbsp;     |\n| value             | `string` `array` | CSS function parameters                               | \u0026nbsp;     |\n| autoAdd\u0026#x3D;true | `boolean`        | True to automatically add new function if not present | _Optional_ |\n\n##### Examples\n\n```javascript\ncssfunc(element, 'transform').update('rotate');\n```\n\n##### Returns\n\n- `boolean` True if a function was updated or added\n\n#### delete(fproperty)\n\nDelete functoin from element style property\n\n##### Parameters\n\n| Name      | Type     | Description       |\n| --------- | -------- | ----------------- |\n| fproperty | `string` | CSS function name |\n\n##### Examples\n\n```javascript\ncssfunc(element, 'transform').delete('rotate');\n```\n\n##### Returns\n\n- `boolean` True if there was a function to delete\n\n#### exists(fproperty)\n\nReturns true if function exists\n\n##### Parameters\n\n| Name      | Type     | Description       |\n| --------- | -------- | ----------------- |\n| fproperty | `string` | CSS function name |\n\n##### Examples\n\n```javascript\ncssfunc(element, 'transform').exists('rotate');\n```\n\n##### Returns\n\n- `boolean` True if function exists\n\n---\n\n## License\n\n[MIT](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcambose%2Fcss-func","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexcambose%2Fcss-func","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexcambose%2Fcss-func/lists"}