{"id":37418658,"url":"https://github.com/loadingio/zmgr","last_synced_at":"2026-01-16T06:03:42.159Z","repository":{"id":57406308,"uuid":"323534552","full_name":"loadingio/zmgr","owner":"loadingio","description":"manage stackable values such as z-index","archived":false,"fork":false,"pushed_at":"2022-05-18T08:34:47.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T03:11:05.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loadingio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-22T05:52:59.000Z","updated_at":"2024-11-05T17:02:27.000Z","dependencies_parsed_at":"2022-09-11T20:41:42.824Z","dependency_job_id":null,"html_url":"https://github.com/loadingio/zmgr","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/loadingio/zmgr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadingio%2Fzmgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadingio%2Fzmgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadingio%2Fzmgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadingio%2Fzmgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loadingio","download_url":"https://codeload.github.com/loadingio/zmgr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadingio%2Fzmgr/sbom","scorecard":{"id":596482,"data":{"date":"2025-08-11","repo":{"name":"github.com/loadingio/zmgr","commit":"489d9f6fe671fd04eac62e152a65c506ea9f3d0e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.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":"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":"Code-Review","score":0,"reason":"Found 0/23 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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.2.3 not signed: https://api.github.com/repos/loadingio/zmgr/releases/67151255","Warn: release artifact v2.2.2 not signed: https://api.github.com/repos/loadingio/zmgr/releases/67150007","Warn: release artifact v2.2.1 not signed: https://api.github.com/repos/loadingio/zmgr/releases/65810175","Warn: release artifact v2.2.0 not signed: https://api.github.com/repos/loadingio/zmgr/releases/65051056","Warn: release artifact v2.1.0 not signed: https://api.github.com/repos/loadingio/zmgr/releases/65048551","Warn: release artifact v2.2.3 does not have provenance: https://api.github.com/repos/loadingio/zmgr/releases/67151255","Warn: release artifact v2.2.2 does not have provenance: https://api.github.com/repos/loadingio/zmgr/releases/67150007","Warn: release artifact v2.2.1 does not have provenance: https://api.github.com/repos/loadingio/zmgr/releases/65810175","Warn: release artifact v2.2.0 does not have provenance: https://api.github.com/repos/loadingio/zmgr/releases/65051056","Warn: release artifact v2.1.0 does not have provenance: https://api.github.com/repos/loadingio/zmgr/releases/65048551"],"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":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"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-20T23:15:51.425Z","repository_id":57406308,"created_at":"2025-08-20T23:15:51.425Z","updated_at":"2025-08-20T23:15:51.425Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":[],"created_at":"2026-01-16T06:03:42.101Z","updated_at":"2026-01-16T06:03:42.155Z","avatar_url":"https://github.com/loadingio.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zmgr\n\nmanage stackable values such as z-index.\n\n\n## Install\n\n    npm install --save zmgr\n\n\n## Usage\n\ninclude `dist/index.js` then:\n\n    mgr = new zmgr({...})\n    ret1 = mgr.add 100, 1\n    ret2 = mgr.add 100, 1\n    mgr.remove ret1\n    mgr.remove ret2\n\n\n## Constructor options\n\n - `init`: default value. optional.\n   - if provided, the first added value will be updated based on `init` and `step`:\n     - if step \u003e 0: max(init, added) will be used\n     - if step \u003c 0: min(init, added) will be used\n - `step`: amount of increase between `add` function calls. default 1 if omitted.\n   - can be negative, indicating a decreased value.\n - `layer`: object containing customized value for named layers. in this object:\n   - key as layer name.\n   - value as layer value. \n\n\n## API\n\n - `add(v,s)`: use a certain  `v`. Return assigned value to use.\n   - params:\n     - `v`: expected z-index or string to indicate layer to use. see `Named Layers` section below.\n       - when `v` is a number, value is added to default layer.\n     - `s`: custom step. direction is ignored.\n       - use `step` (in constructor option) if omitted.\n - `remove(n, v)`: remove a used value from layer n.\n   - when n is a number, value is removed from default layer.\n - `scope(n)`: return a scoped interface to this object with `add` and `remove` methods.\n   - `add` / `remove` work the same as `add` / `remove` in this object, except they can be called without parameters.\n   - `n`: default layer name for this scope.\n\n\n## Layered Values\n\nYou can use multiple `zmgr` with different `init` value to better separate values for different purpose. For example, assume we have some dialogs to popup. Some of them are just hints and some of them are important message and users must interact with them.\n\nWe can thus use 2 `zmgr` for configuring them `z-index` accordingly:\n\n    manager = do\n      prompt: new zmgr init: 10000\n      hint: new zmgr init: 100\n\n    ldcv = do\n      prompt1: new ldcover zmgr: manager.prompt\n      prompt2: new ldcover zmgr: manager.prompt\n      hint1: new ldcover zmgr: manager.hint\n      hint2: new ldcover zmgr: manager.hint\n\n\n### Named Layers\n\nAlternatively, you can use `string` as layer name when adding a value:\n\n    mgr = new zmgr({\n      group: {\n        \"my new group\": 100  # initial value for `my new group` layer is 100\n        \"default\": 10        # initial value for `default` layer is 10\n      }\n    );\n    mgr.add \"my new group\" # return 101\n    mgr.add \"default\" # return 11\n    mgr.add \"my new group\" # return 102\n\nTo scope APIs to specific layer by default, use `scope`:\n\n    splash = mgr.scope('splash')\n    val = splash.add()  # return 4001\n\n\nzmgr is by default shipped with following layers (and their corresponding default values):\n\n - `notify`: 5000\n - `splash`: 4000\n - `modal`: 3000\n - `fixed`: 2000\n - `float`: 1000\n - `base`: 1\n\ninstead of using these names as string directly, you can use predefined members such as `zmgr.notify`:\n\n    mgr.add(zmgr.notify);\n\n\n\n## Fallback\n\nWhile zmgr is necessary for aligning values such as `z-index` across components, we can prepare a fallback one if zmgr is not available ( example in livescript ):\n\n    zmgr = do\n      add: (v) -\u003e @[]s.push(z = Math.max(v or 0, (@s[* - 1] or 0) + 1)); return z\n      remove: (v) -\u003e if (i = @[]s.indexOf(v)) \u003c 0 =\u003e return else @s.splice(i,1)\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadingio%2Fzmgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floadingio%2Fzmgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadingio%2Fzmgr/lists"}