{"id":16682627,"url":"https://github.com/jchip/string-array","last_synced_at":"2025-09-23T18:36:44.950Z","repository":{"id":56198677,"uuid":"135615717","full_name":"jchip/string-array","owner":"jchip","description":"⚙Parse string into array of string elements","archived":false,"fork":false,"pushed_at":"2020-11-21T00:21:43.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T00:44:38.051Z","etag":null,"topics":["array","parse","parser","string"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jchip.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":"2018-05-31T17:32:50.000Z","updated_at":"2018-09-21T11:14:59.000Z","dependencies_parsed_at":"2022-08-15T14:31:24.965Z","dependency_job_id":null,"html_url":"https://github.com/jchip/string-array","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jchip/string-array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fstring-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fstring-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fstring-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fstring-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jchip","download_url":"https://codeload.github.com/jchip/string-array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fstring-array/sbom","scorecard":{"id":511375,"data":{"date":"2025-08-11","repo":{"name":"github.com/jchip/string-array","commit":"5203d6cf1463db7dc3c4058b373a9f45255f554f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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/8 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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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-20T00:37:39.532Z","repository_id":56198677,"created_at":"2025-08-20T00:37:39.533Z","updated_at":"2025-08-20T00:37:39.533Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276630367,"owners_count":25676633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"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":["array","parse","parser","string"],"created_at":"2024-10-12T14:08:07.067Z","updated_at":"2025-09-23T18:36:44.905Z","avatar_url":"https://github.com/jchip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]\n[![Dependency Status][daviddm-image]][daviddm-url] [![devDependency Status][daviddm-dev-image]][daviddm-dev-url]\n\n# String Array\n\nParse string into array of string elements.\n\n`\"[ hello, world, [ 1, [2, [ 3 ]]]]\"` :arrow_right: `[ \"hello\", \"world\", [ \"1\", [ \"2\", [ \"3\" ]]]]`\n\n## Install\n\n```bash\nnpm i --save string-array\n```\n\n## Usage\n\n```js\nconst stringArray = require(\"string-array\");\n\nconst r1 = stringArray.parse(\"[]\");\n// r1 === { prefix: \"\", array: [], remain: \"\" }\nconst r2 = stringArray.parse(\"test[1,2,3]\");\n// r2 === { prefix: \"test\", array: [\"1\",\"2\",\"3\"], remain: \"\" }\n```\n\n* Elements are automatically treated as strings, so quotes `'`, `\"` and backtick are taken as part of element.\n\n* All leading and trailing whitespaces are automatically `trim`ed.\n\n* Can't have these characters in elements: `,` `[` `]`\n\n## Examples\n\n* `stringArray.parse(\"\")`:\n* `stringArray.parse(\"[]\")`:\n\n```js\n{\n  prefix: \"\",\n  array: [],\n  remain: \"\"\n}\n```\n\n* `stringArray.parse('test[1,2,\"3\"]')`:\n\n```js\n{\n  prefix: \"test\",\n  array: [\"1\",\"2\", '\"3\"'],\n  remain: \"\"\n}\n```\n\n* `stringArray.parse(\"[hello, world, [ [ foo, bar ], 1, [ 2 ], 3 ] ] some other stuff [blah]\")`:\n\n```js\n{\n  prefix: \"\",\n  array: [\"hello\", \"world\", [ [\"foo\", \"bar\"], \"1\", [\"2\"], \"3\" ] ],\n  remain: \"some other stuff [blah]\"\n}\n```\n\n\u003e More samples in [test](./test/spec/index.spec.js)\n\n## Parameters\n\n#### `stringArray.parse(str, noPrefix, noExtra)`\n\n* `str` - string array to be parsed\n* `noPrefix` - if `true`, then do not check for a prefix\n* `noExtra` - if `true`, then do not allow trailing text following a complete array in `str`\n\n## Throws\n\n* `AssertionError(\"array missing [\")`\n  * Also throws if `str` doesn't start with `[` and `noPrefix` is `true`\n* `AssertionError(\"array missing ]\")`\n* `AssertionError(\"array has extra ]\")`\n* `AssertionError(\"extra data at end of array\")` - if `noExtra` is `true` and there are extra text following a complete array in `str`\n\n## License\n\nLicensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\n[travis-image]: https://travis-ci.org/jchip/string-array.svg?branch=master\n[travis-url]: https://travis-ci.org/jchip/string-array\n[npm-image]: https://badge.fury.io/js/string-array.svg\n[npm-url]: https://npmjs.org/package/string-array\n[daviddm-image]: https://david-dm.org/jchip/string-array/status.svg\n[daviddm-url]: https://david-dm.org/jchip/string-array\n[daviddm-dev-image]: https://david-dm.org/jchip/string-array/dev-status.svg\n[daviddm-dev-url]: https://david-dm.org/jchip/string-array?type=dev\n[npm scripts]: https://docs.npmjs.com/misc/scripts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fstring-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjchip%2Fstring-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fstring-array/lists"}