{"id":15042713,"url":"https://github.com/sindresorhus/arrify","last_synced_at":"2025-05-16T08:05:31.461Z","repository":{"id":27396464,"uuid":"30872807","full_name":"sindresorhus/arrify","owner":"sindresorhus","description":"Convert a value to an array","archived":false,"fork":false,"pushed_at":"2021-11-09T19:53:52.000Z","size":15,"stargazers_count":129,"open_issues_count":1,"forks_count":27,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-10T00:48:03.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2015-02-16T14:53:33.000Z","updated_at":"2025-03-13T03:25:17.000Z","dependencies_parsed_at":"2022-07-07T11:03:24.368Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/arrify","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Farrify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Farrify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Farrify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Farrify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/arrify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253903675,"owners_count":21981729,"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","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":"2024-09-24T20:47:48.274Z","updated_at":"2025-05-16T08:05:26.446Z","avatar_url":"https://github.com/sindresorhus.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate","https://tidelift.com/subscription/pkg/npm-arrify?utm_source=npm-arrify\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["TypeScript"],"sub_categories":[],"readme":"# arrify\n\n\u003e Convert a value to an array\n\n*If you simply want to accept both a single value and multiple values, you can use `[singleValueOrArray].flat()` instead.*\n\n## Install\n\n```sh\nnpm install arrify\n```\n\n## Usage\n\n```js\nimport arrify from 'arrify';\n\narrify('🦄');\n//=\u003e ['🦄']\n\narrify(['🦄']);\n//=\u003e ['🦄']\n\narrify(new Set(['🦄']));\n//=\u003e ['🦄']\n\narrify(null);\n//=\u003e []\n\narrify(undefined);\n//=\u003e []\n```\n\n*Specifying `null` or `undefined` results in an empty array.*\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cb\u003e\n\t\t\u003ca href=\"https://tidelift.com/subscription/pkg/npm-arrify?utm_source=npm-arrify\u0026utm_medium=referral\u0026utm_campaign=readme\"\u003eGet professional support for this package with a Tidelift subscription\u003c/a\u003e\n\t\u003c/b\u003e\n\t\u003cbr\u003e\n\t\u003csub\u003e\n\t\tTidelift helps make open source sustainable for maintainers while giving companies\u003cbr\u003eassurances about security, maintenance, and licensing for their dependencies.\n\t\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Farrify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Farrify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Farrify/lists"}