{"id":18924644,"url":"https://github.com/dash-os/wildcard-utils","last_synced_at":"2025-10-14T14:40:30.702Z","repository":{"id":71821454,"uuid":"92650257","full_name":"Dash-OS/wildcard-utils","owner":"Dash-OS","description":"Matching, Searching, and Filtering wildcard (*) values that match a given wildcard pattern. (Works in Browser)","archived":false,"fork":false,"pushed_at":"2017-11-24T22:34:42.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-20T10:36:29.804Z","etag":null,"topics":["filter","glob","match","regexp","search","wildcard"],"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/Dash-OS.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,"zenodo":null}},"created_at":"2017-05-28T08:54:12.000Z","updated_at":"2017-11-23T01:28:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe9b6494-0a69-4762-903f-4a7d2a2aa9e7","html_url":"https://github.com/Dash-OS/wildcard-utils","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Dash-OS/wildcard-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dash-OS%2Fwildcard-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dash-OS%2Fwildcard-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dash-OS%2Fwildcard-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dash-OS%2Fwildcard-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dash-OS","download_url":"https://codeload.github.com/Dash-OS/wildcard-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dash-OS%2Fwildcard-utils/sbom","scorecard":{"id":37691,"data":{"date":"2025-08-11","repo":{"name":"github.com/Dash-OS/wildcard-utils","commit":"4f608048f2ab748234d8c0f08147dce44b0db03a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/28 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":"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":"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-14T20:41:38.970Z","repository_id":71821454,"created_at":"2025-08-14T20:41:38.970Z","updated_at":"2025-08-14T20:41:38.970Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019154,"owners_count":26086682,"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-10-14T02:00:06.444Z","response_time":60,"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":["filter","glob","match","regexp","search","wildcard"],"created_at":"2024-11-08T11:07:39.130Z","updated_at":"2025-10-14T14:40:30.697Z","avatar_url":"https://github.com/Dash-OS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wildcard-utils\n\nA small, flow-covered, zero-dependency package to work with wildcard (\\*) values\nby matching, searching, and filtering values that match a given wildcard\npattern.\n\nValues can be `string`, `Array\u003cstring\u003e`, `Set\u003cstring\u003e`, `{ [key: string]: any\n}`. Support for `Map` is also planned in the future.\n\nReverse filtering is also available to search the above types as patterns\ninstead of as matches\n([see examples](https://github.com/Dash-OS/wildcard-utils/tree/master/examples)).\n\n### BROWSER COMPATIBLE!\n\n---\n\n## Installation\n\n```\nyarn add wildcard-utils\n```\n\n**or**\n\n```\nnpm install --save wildcard-utils\n```\n\n---\n\n## Flow Coverage\n\nProudly built with 100% Flow Coverage and exported .flow.js files so your flow\nprojects will benefit!\n\nWe strongly recommend you look over the\n[types](https://github.com/Dash-OS/wildcard-utils/tree/master/src/types.js) in\nthe source. This will give you an idea of how the various pieces of the package\nwork.\n\n---\n\n## Examples\n\n\u003e This package provides extreme flexibility for searching values for wildcard\n\u003e matches. While the example below is simple, you are encouraged to take a look\n\u003e at the\n\u003e [examples folders](https://github.com/Dash-OS/wildcard-utils/tree/master/examples)\n\u003e for examples of the more advanced functionality that is available.\n\n### Simple String Example\n\nA simple example using simple string matching against a given wildcard pattern.\n\n```js\nimport { Wildcard } from 'wildcard-utils';\n\nconst system_wildcard = new Wildcard().case(false).pattern('system*');\n\nconst isSystemType = type =\u003e system_wildcard.match(type);\n\nisSystemType('SYSTEM_OFFLINE');\n// true\n\nisSystemType('NETWORK_OFFLINE');\n// false\n```\n\n### More Examples\n\nMore examples can be seen and tested by checking out the\n[examples folders](https://github.com/Dash-OS/wildcard-utils/tree/master/examples)\n\n---\n\n## Exports\n\nThere are two ways you can use this package. If you simply wish to use the\nsimplistic pattern generator that is used to build the `RegExp` values, you can\nimport from `wildcard-utils/to-pattern`. For the full-featured version, import\nthe `Wildcard` class directly.\n\n### Common Flow Types\n\n```js\nexport type Wildcard$RegExpFlags = $CharSet\u003c'gimsuy'\u003e;\n\nexport type Wildcard$ToPatternTypes =\n  | string\n  | Array\u003cstring\u003e\n  | Set\u003cstring\u003e\n  | { [key: string]: * };\n\nexport type Wildcard$Config = {\n  logic: 'and' | 'or',\n  flags: Wildcard$RegExpFlags,\n};\n```\n\n### RegExp Generator\n\n```js\ndeclare function toWildcardPattern(\n  patterns: Wildcard$ToPatternTypes,\n  config?: $Shape\u003cWildcard$Config\u003e,\n): RegExp;\n```\n\n```js\nimport toWildcardPattern from 'wildcard-utils/to-pattern';\n\nconst pattern = toWildcardPattern(['ONE*TWO*THREE', 'FOUR*FIVE*SIX'], {\n  logic: 'or',\n  flags: 'i',\n});\n```\n\n### Wildcard Class\n\n```js\nimport Wildcard from 'wildcard-utils';\nconst WC = new Wildcard();\n\nWC.case(false)\n  .logic('or')\n  .pattern(['foo*', 'bar*', 'baz*qux']);\n```\n\n#### `.pattern()`\n\n```js\n(pattern: Wildcard$ToPatternTypes, force?: boolean) =\u003e Wildcard;\n```\n\n#### `.match()`\n\n```js\n(data: Wildcard$ToPatternTypes, pattern?: RegExp | Wildcard$ToPatternTypes) =\u003e\n  boolean;\n```\n\n#### `.filter()`\n\n```js\n(data: Wildcard$ToPatternTypes, nomatch: mixed = undefined) =\u003e\n  $Matched_DATA_Subset | nomatch;\n```\n\n#### `.search()`\n\n\u003e This is a reverse filter where the pattern is searched instead of the `data`\n\n```js\n(data: Wildcard$ToPatternTypes, nomatch: mixed = undefined) =\u003e\n  $Matched_PATTERN_Subset | nomatch;\n```\n\n#### `.has()`\n\nChecks if a Wildcard is present in the given pattern value. If no argument is\nprovided, it checks the last provided value to `.pattern()`.\n\n```js\n(pattern?: Wildcard$ToPatternTypes) =\u003e boolean;\n```\n\n#### `.logic()`\n\n```js\n(logic: 'and' | 'or', compile?: boolean) =\u003e Wildcard;\n```\n\n#### `.case()`\n\n```js\n(match: boolean, compile?: boolean) =\u003e Wildcard;\n```\n\n#### `.flags()`\n\n```js\n(flags: Wildcard$RegExpFlags, compile?: boolean) =\u003e Wildcard;\n```\n\n#### `.reset()`\n\n```js\n() =\u003e Wildcard;\n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash-os%2Fwildcard-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdash-os%2Fwildcard-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash-os%2Fwildcard-utils/lists"}