{"id":15862053,"url":"https://github.com/afeiship/next-splitlines","last_synced_at":"2025-04-01T20:35:17.123Z","repository":{"id":57122900,"uuid":"315834426","full_name":"afeiship/next-splitlines","owner":"afeiship","description":"Split string by `\\r\\n` or `\\n` or `\\r` for next.","archived":false,"fork":false,"pushed_at":"2021-01-09T08:37:05.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T05:36:49.346Z","etag":null,"topics":["lines","next","nl","nx","split","splitlines","trim"],"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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-25T05:06:14.000Z","updated_at":"2021-01-09T08:37:08.000Z","dependencies_parsed_at":"2022-08-24T14:56:56.554Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-splitlines","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-splitlines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-splitlines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-splitlines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-splitlines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-splitlines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709932,"owners_count":20821297,"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":["lines","next","nl","nx","split","splitlines","trim"],"created_at":"2024-10-05T22:24:05.281Z","updated_at":"2025-04-01T20:35:17.094Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","readme":"# next-splitlines\n\u003e Split string by `\\r\\n` or `\\n` or `\\r` for next.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-splitlines\n```\n\n## usage\n```js\nimport '@jswork/next-splitlines';\n\nconst str = `1\n00:00:03,776 --\u003e 00:00:09,152\nTechnology trends may push Silicon Valley back to the future.\n\n2\n00:00:09,152 --\u003e 00:00:19,009\nCarver Mead, a pioneer in integrated circuits and a professor of computer science at the California Institute of Technology,\n\n3\n00:00:19,009 --\u003e 00:00:33,473\nnotes there are now work-stations that enable engineers to design, test and produce chips right on their desks, much the way an editor creates a newsletter on a Macintosh.\n\n`;\n\nconst liens = nx.splitlines(str);\n\n/*\n[\n  '﻿1',\n  '00:00:03,776 --\u003e 00:00:09,152',\n  'Technology trends may push Silicon Valley back to the future.',\n  '',\n  '2',\n  '00:00:09,152 --\u003e 00:00:19,009',\n  'Carver Mead, a pioneer in integrated circuits and a professor of computer science at the California Institute of Technology,',\n  '',\n  '3',\n  '00:00:19,009 --\u003e 00:00:33,473',\n  'notes there are now work-stations that enable engineers to design, test and produce chips right on their desks, much the way an editor creates a newsletter on a Macintosh.',\n  '',\n  ''\n];\n*/\n```\n\n## resources\n- https://stackoverflow.com/questions/21895233/how-in-node-to-split-string-by-newline-n\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-splitlines/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-splitlines\n[version-url]: https://npmjs.org/package/@jswork/next-splitlines\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-splitlines\n[license-url]: https://github.com/afeiship/next-splitlines/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-splitlines\n[size-url]: https://github.com/afeiship/next-splitlines/blob/master/dist/next-splitlines.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-splitlines\n[download-url]: https://www.npmjs.com/package/@jswork/next-splitlines\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-splitlines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-splitlines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-splitlines/lists"}