{"id":27373966,"url":"https://github.com/arccoza/zenhand","last_synced_at":"2026-04-15T13:34:06.439Z","repository":{"id":24097256,"uuid":"100558723","full_name":"arccoza/zenhand","owner":"arccoza","description":"Turn a shorthand CSS selector like HTML string into an HTML object.","archived":false,"fork":false,"pushed_at":"2022-03-24T02:50:33.000Z","size":71,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T17:02:27.112Z","etag":null,"topics":["ast","coding","css","html","hyperscript","micro","selector","shorthand","small","terse","tiny","zen","zenhand"],"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/arccoza.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}},"created_at":"2017-08-17T03:46:40.000Z","updated_at":"2023-06-19T08:15:39.000Z","dependencies_parsed_at":"2022-08-07T11:00:54.643Z","dependency_job_id":null,"html_url":"https://github.com/arccoza/zenhand","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/arccoza/zenhand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arccoza%2Fzenhand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arccoza%2Fzenhand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arccoza%2Fzenhand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arccoza%2Fzenhand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arccoza","download_url":"https://codeload.github.com/arccoza/zenhand/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arccoza%2Fzenhand/sbom","scorecard":{"id":205410,"data":{"date":"2025-08-11","repo":{"name":"github.com/arccoza/zenhand","commit":"397bc358cc3fcb23beaa28eba84f7bc522dbee89"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"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":"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":"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":"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/22 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":"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":"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":"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":"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":"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":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 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":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9"],"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-16T23:37:14.474Z","repository_id":24097256,"created_at":"2025-08-16T23:37:14.474Z","updated_at":"2025-08-16T23:37:14.474Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"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":["ast","coding","css","html","hyperscript","micro","selector","shorthand","small","terse","tiny","zen","zenhand"],"created_at":"2025-04-13T11:36:05.599Z","updated_at":"2026-04-15T13:34:06.411Z","avatar_url":"https://github.com/arccoza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[travis]:       https://travis-ci.org/arccoza/zenhand\n[travis-img]:   https://travis-ci.org/arccoza/zenhand.svg\n\n# Zenhand [![Travis Build Status][travis-img]][travis]\nZenhand parses a shorthand CSS selector like string representing an HTML element, and returns an object describing that element.\n\n## Example\n```js\nvar {zenhand} = require('zenhand')\n// import {zenhand} from 'zenhand'  // If you're using es modules.\n\nvar obj = zenhand('div#ex.exmpl.info[style=background:red;color:black][data-name=temp]')\nconsole.log(obj)\n```\n__output:__\n```js\n{ tag: 'div',\n  attrs: \n   { class: [ 'exmpl', 'info' ],\n     style: { background: 'red', color: 'black' },\n     id: 'ex',\n     'data-name': 'temp' } }\n```\n\n## Install\n`npm install --save zenhand`\n\nor\n\n`yarn add zenhand`\n\n## API\n\n### zenhand(str[, opts])\n\n* **str**\n  The CSS selector like string to convert into an object representing the HTML element. The `str` is made up of the following parts:\n  * The very first part of the string can be an HTML tag, if left out it defaults to `div`.\n  * **#** defines an `id`, should only have one, duplicates will overwrite one another, can be placed anywhere in the string after the tag.\n  * **.** defines a `class`, multiples allowed, duplicates will be added to the `class` property, can be placed anywhere in the string after the tag. \n  * **[attr=val]** place an attribute definition inside square brackets, multiples allowed, can be placed anywhere in the string after the tag.\n* **opts**\n  An options object.\n  * **changeStyleCase**\n    If true automatic conversion between camelCase and kebab-case for property names, default is `true`.\n* **return**\n  An object representing the HTML element.\n\nThe module also exports two helper functions; `toStyleStr` and `fromStyleStr`.\n\n### toStyleStr(obj[, fromCase, toCase])\nConvert an object representation of CSS styles into a string, optionally converting property case.\n\n```js\nvar {toStyleStr, zenhand} = require('zenhand')\n// Input.\nvar obj = {\n  position: 'absolute',\n  'backgroundColor': '#ff0000',\n}\n\nconsole.log(toStyleStr(obj, 'camel', 'kebab'))\n\n// Output.\n'position:absolute; background-color:#ff0000;'\n```\n\nSupports `camel` for camelCase, `kebab` for kebab-case, and `snake` for snake_case.\n\n### fromStyleStr(str[, fromCase, toCase])\nConvert a str representation of CSS styles into an object, optionally converting property case.\n\n```js\nvar {fromStyleStr, zenhand} = require('zenhand')\n// Input.\nvar str = 'position:absolute; background-color:#ff0000;'\n\nconsole.log(fromStyleStr(str, 'kebab', 'camel'))\n\n// Output.\n{\n  position: 'absolute',\n  'backgroundColor': '#ff0000',\n}\n```\n\nSupports `camel` for camelCase, `kebab` for kebab-case, and `snake` for snake_case.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farccoza%2Fzenhand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farccoza%2Fzenhand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farccoza%2Fzenhand/lists"}