{"id":44764367,"url":"https://github.com/helpers/helper-sort-items","last_synced_at":"2026-02-16T03:36:31.376Z","repository":{"id":57262708,"uuid":"82517126","full_name":"helpers/helper-sort-items","owner":"helpers","description":"Helper for filtering and sorting an assemble collection based on an array of strings.","archived":false,"fork":false,"pushed_at":"2017-02-20T04:37:34.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-09T07:46:45.072Z","etag":null,"topics":["assemble","handlebars","helper","items","sort"],"latest_commit_sha":null,"homepage":"https://github.com/helpers/helper-sort-items","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/helpers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-20T04:36:21.000Z","updated_at":"2017-08-16T20:24:14.000Z","dependencies_parsed_at":"2022-09-01T10:20:29.988Z","dependency_job_id":null,"html_url":"https://github.com/helpers/helper-sort-items","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/helpers/helper-sort-items","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhelper-sort-items","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhelper-sort-items/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhelper-sort-items/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhelper-sort-items/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helpers","download_url":"https://codeload.github.com/helpers/helper-sort-items/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helpers%2Fhelper-sort-items/sbom","scorecard":{"id":460721,"data":{"date":"2025-08-11","repo":{"name":"github.com/helpers/helper-sort-items","commit":"3c49a4181936114170c0b45773093820a8cdf78a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"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":"Code-Review","score":0,"reason":"Found 0/1 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":"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":"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":"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":"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":"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":"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":"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"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/helpers/.github/SECURITY.md:1","Info: Found linked content: github.com/helpers/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/helpers/.github/SECURITY.md:1","Info: Found text in security policy: github.com/helpers/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-19T11:04:34.702Z","repository_id":57262708,"created_at":"2025-08-19T11:04:34.703Z","updated_at":"2025-08-19T11:04:34.703Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29499615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T02:07:14.481Z","status":"online","status_checked_at":"2026-02-16T02:03:22.852Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":true,"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":["assemble","handlebars","helper","items","sort"],"created_at":"2026-02-16T03:36:30.796Z","updated_at":"2026-02-16T03:36:31.353Z","avatar_url":"https://github.com/helpers.png","language":"JavaScript","readme":"# helper-sort-items [![NPM version](https://img.shields.io/npm/v/helper-sort-items.svg?style=flat)](https://www.npmjs.com/package/helper-sort-items) [![NPM monthly downloads](https://img.shields.io/npm/dm/helper-sort-items.svg?style=flat)](https://npmjs.org/package/helper-sort-items)  [![NPM total downloads](https://img.shields.io/npm/dt/helper-sort-items.svg?style=flat)](https://npmjs.org/package/helper-sort-items) [![Linux Build Status](https://img.shields.io/travis/helpers/helper-sort-items.svg?style=flat\u0026label=Travis)](https://travis-ci.org/helpers/helper-sort-items)\n\n\u003e Helper for filtering and sorting an assemble collection based on an array of strings.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save helper-sort-items\n```\n\n## Usage\n\nThis is designed with [assemble](https://github.com/assemble/assemble) collections in mind, but it's generic enough that it should work with an array of strings too.\n\n**Example**\n\nThe following example shows how to sort and filter the items in an [assemble](https://github.com/assemble/assemble) collection.\n\n```js\nvar assemble = require('assemble');\nvar app = assemble();\n\napp.helper('sortItems', require('helper-sort-items'));\napp.pages('templates/*.hbs');\n```\n\nGiven that four pages have been loaded: `foo.hbs`, `bar.hbs`, `baz.hbs`, and `some-file.hbs`, the following:\n\n```handlebars\n\u003c!-- in \"some-file.hbs\" --\u003e\n{{#pages}}\n  {{#each (sortItems items) as |item|}}\n    {{item.basename}}\n  {{/each}}\n{{/pages}}\n```\n\nWhen rendered with these options:\n\n```js\nvar locals = {order: ['baz', 'bar', 'foo']};\n\napp.render('some-file.hbs', locals, function(err, view) {\n  if (err) {\n    console.log(err);\n    process.exit(1);\n  }\n  console.log(view.contents.toString());\n});\n```\n\nWould result in:\n\n```\nbaz.hbs\nbar.hbs\nfoo.hbs\n```\n\n## Sort order\n\nYou can also pass the sort order as the last argument as a comma-separated string:\n\n```handlebars\n{{#pages}}\n  {{#each (sortItems items \"baz,foo,bar\") as |item|}}\n    {{item.basename}}\n  {{/each}}\n{{/pages}}\n```\n\nOr when used as a [handlebars](http://www.handlebarsjs.com/) helper, you can pass the sort order on the options hash as a comma-separated string:\n\n```handlebars\n{{#pages}}\n  {{#each (sortItems items order=\"baz,foo,bar\") as |item|}}\n    {{item.basename}}\n  {{/each}}\n{{/pages}}\n```\n\n## About\n\n### Related projects\n\n* [handlebars-helpers](https://www.npmjs.com/package/handlebars-helpers): More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate… [more](https://github.com/assemble/handlebars-helpers) | [homepage](https://github.com/assemble/handlebars-helpers \"More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.\")\n* [template-helpers](https://www.npmjs.com/package/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… [more](https://github.com/jonschlinkert/template-helpers) | [homepage](https://github.com/jonschlinkert/template-helpers \"Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nMIT\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 19, 2017._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpers%2Fhelper-sort-items","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelpers%2Fhelper-sort-items","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelpers%2Fhelper-sort-items/lists"}