{"id":16490701,"url":"https://github.com/awinterman/new-from","last_synced_at":"2025-03-23T12:34:39.356Z","repository":{"id":10492153,"uuid":"12673535","full_name":"AWinterman/new-from","owner":"AWinterman","description":"modernized [from](https://github.com/dominictarr/from)","archived":false,"fork":false,"pushed_at":"2020-02-20T20:44:29.000Z","size":6,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T20:36:01.995Z","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/AWinterman.png","metadata":{"files":{"readme":"readme.markdown","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}},"created_at":"2013-09-08T00:02:17.000Z","updated_at":"2020-02-20T20:44:31.000Z","dependencies_parsed_at":"2022-07-21T12:32:40.799Z","dependency_job_id":null,"html_url":"https://github.com/AWinterman/new-from","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fnew-from","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fnew-from/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fnew-from/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fnew-from/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWinterman","download_url":"https://codeload.github.com/AWinterman/new-from/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245104460,"owners_count":20561377,"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-10-11T13:48:45.770Z","updated_at":"2025-03-23T12:34:39.063Z","avatar_url":"https://github.com/AWinterman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# new-from\n\nA modern version of dominictarr's from, implemented with the new stream api. \n\n# Deprecation notice\nThere are other modules that accomplish the same or similar goals.\n\n- from2 - pretty much identical.\n- into-stream - similar goals.\n\nAlso, the readable-stream constructors are much easier to use now.\n\n## API:\n\n```javascript\nvar from = require('new-from')\n\nvar zero_to_nine = from(make_chunk)\n\nfunction make_chunk(idx) {\n  if(idx \u003c 10) {\n    return idx\n  }  \n  return null\n}\n\n// Or, in this case:\n\nzero_to_nine = from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawinterman%2Fnew-from","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawinterman%2Fnew-from","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawinterman%2Fnew-from/lists"}