{"id":21766599,"url":"https://github.com/damianc/spreadmap","last_synced_at":"2025-03-21T05:25:10.685Z","repository":{"id":200596323,"uuid":"705888209","full_name":"damianc/spreadMap","owner":"damianc","description":"The mapping that maps one value to more values.","archived":false,"fork":false,"pushed_at":"2024-03-03T19:28:50.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T02:19:58.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/damianc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-16T22:25:45.000Z","updated_at":"2023-10-16T22:26:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"c37d66aa-cc7a-4638-9626-8555ac09aa6b","html_url":"https://github.com/damianc/spreadMap","commit_stats":null,"previous_names":["damianc/spreadmap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damianc%2FspreadMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damianc%2FspreadMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damianc%2FspreadMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damianc%2FspreadMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damianc","download_url":"https://codeload.github.com/damianc/spreadMap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244742312,"owners_count":20502452,"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-11-26T13:18:12.663Z","updated_at":"2025-03-21T05:25:10.661Z","avatar_url":"https://github.com/damianc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spreadMap\n\nIt works like the `map()` method, but one value is mapped to more values. It is achieved by returning an array of values to spread into the final array from a callback passed to the method.\n\n```\nspreadMap(\n (item, index, array) =\u003e array\n)\n```\n\n\u003e As of **ES10** you can use built-in `flatMap()` method instead.\n\n## Example\n\n```\nconst arr = [1,2,3,4];\nconst sm = arr.spreadMap(\n  x =\u003e [x, x**2]\n);\n\nconsole.log(sm);\n// [1,1,2,4,3,9,4,16]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamianc%2Fspreadmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamianc%2Fspreadmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamianc%2Fspreadmap/lists"}