{"id":21010625,"url":"https://github.com/prohetamine/split-slice","last_synced_at":"2025-10-15T14:43:25.040Z","repository":{"id":57367696,"uuid":"451765204","full_name":"prohetamine/split-slice","owner":"prohetamine","description":"🍰 Cut the string to a certain length, use hyphenation or space, align center/left/right.","archived":false,"fork":false,"pushed_at":"2022-01-25T07:16:56.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T17:13:29.036Z","etag":null,"topics":["browser","console-log","javascript","node-module","nodejs","slice","split","split-slice","text"],"latest_commit_sha":null,"homepage":"","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/prohetamine.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}},"created_at":"2022-01-25T06:42:22.000Z","updated_at":"2022-04-14T04:09:18.000Z","dependencies_parsed_at":"2022-08-23T20:10:53.151Z","dependency_job_id":null,"html_url":"https://github.com/prohetamine/split-slice","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/prohetamine%2Fsplit-slice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2Fsplit-slice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2Fsplit-slice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prohetamine%2Fsplit-slice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prohetamine","download_url":"https://codeload.github.com/prohetamine/split-slice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437541,"owners_count":20290857,"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":["browser","console-log","javascript","node-module","nodejs","slice","split","split-slice","text"],"created_at":"2024-11-19T09:21:47.752Z","updated_at":"2025-10-15T14:43:24.920Z","avatar_url":"https://github.com/prohetamine.png","language":"JavaScript","readme":"# 🍰 split-slice\n\n/* There will be normal documentation. Someday.. */\n\n```javascript\nconst splitSlice = require('./index.js')\n\nconst text = \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\"\n\nconst none = splitSlice()\n    , sliceandslice = splitSlice(text, 50)\n    , space = splitSlice(text, 50, { space: true })\n    , alignandspace = splitSlice(text, 50, { space: true, align: 'right' })\n    , hyph = splitSlice(text, 50, { hyph: true })\n    , alignandhyph = splitSlice(text, 50, { hyph: true, align: 'left' })\n\nconsole.log('none --\u003e', none.join('\\n'))\nconsole.log('\\n')\nconsole.log('split and slice --\u003e')\nconsole.log(sliceandslice.join('\\n'))\nconsole.log('\\n')\nconsole.log('space --\u003e')\nconsole.log(space.join('\\n'))\nconsole.log('\\n')\nconsole.log('align and space --\u003e')\nconsole.log(alignandspace.join('\\n'))\nconsole.log('\\n')\nconsole.log('hyph --\u003e')\nconsole.log(hyph.join('\\n'))\nconsole.log('\\n')\nconsole.log('align and hyph --\u003e')\nconsole.log(alignandhyph.join('\\n'))\nconsole.log('\\n')\n```\n\n## Output\n\n```bash\nnone --\u003e\n\n\nsplit and slice --\u003e\nLorem Ipsum is simply dummy text of the printing a\nnd typesetting industry. Lorem Ipsum has been the\nindustry's standard dummy text ever since the 1500\ns, when an unknown printer took a galley of type a\nnd scrambled it to make a type specimen book. It h\nas survived not only five centuries, but also the\nleap into electronic typesetting, remaining essent\nially unchanged. It was popularised in the 1960s w\nith the release of Letraset sheets containing Lore\nm Ipsum passages, and more recently with desktop p\nublishing software like Aldus PageMaker including\nversions of Lorem Ipsum.\n\n\nspace --\u003e\nLorem Ipsum is simply dummy text of the printing  \nand typesetting industry. Lorem Ipsum has been the\nindustry's standard dummy text ever since the     \n1500s, when an unknown printer took a galley of type  \nand scrambled it to make a type specimen book. It  \nhas survived not only five centuries, but also the\nleap into electronic typesetting, remaining       \nessentially unchanged. It was popularised in the 1960s  \nwith the release of Letraset sheets containing     \nLorem Ipsum passages, and more recently with desktop  \npublishing software like Aldus PageMaker including\nversions of Lorem Ipsum.  \n\n\nalign and space --\u003e\n      Lorem Ipsum is simply dummy text of the printing  \n     and typesetting industry. Lorem Ipsum has been the\n      industry's standard dummy text ever since the     \n  1500s, when an unknown printer took a galley of type  \n     and scrambled it to make a type specimen book. It  \n     has survived not only five centuries, but also the\n      leap into electronic typesetting, remaining       \nessentially unchanged. It was popularised in the 1960s  \n     with the release of Letraset sheets containing     \n  Lorem Ipsum passages, and more recently with desktop  \n     publishing software like Aldus PageMaker including\n                              versions of Lorem Ipsum.  \n\n\nhyph --\u003e\nLorem Ipsum is simply dummy text of the printing a-\nnd typesetting industry. Lorem Ipsum has been the\nindustry's standard dummy text ever since the 1500\ns, when an unknown printer took a galley of type a-\nnd scrambled it to make a type specimen book. It h-\nas survived not only five centuries, but also the\nleap into electronic typesetting, remaining essent-\nially unchanged. It was popularised in the 1960s w-\nith the release of Letraset sheets containing Lore-\nm Ipsum passages, and more recently with desktop p-\nublishing software like Aldus PageMaker including\nversions of Lorem Ipsum.\n\n\nalign and hyph --\u003e\nLorem Ipsum is simply dummy text of the printing a-\nnd typesetting industry. Lorem Ipsum has been the  \nindustry's standard dummy text ever since the 1500\ns, when an unknown printer took a galley of type a-\nnd scrambled it to make a type specimen book. It h-\nas survived not only five centuries, but also the  \nleap into electronic typesetting, remaining essent-\nially unchanged. It was popularised in the 1960s w-\nith the release of Letraset sheets containing Lore-\nm Ipsum passages, and more recently with desktop p-\nublishing software like Aldus PageMaker including  \nversions of Lorem Ipsum.                           \n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprohetamine%2Fsplit-slice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprohetamine%2Fsplit-slice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprohetamine%2Fsplit-slice/lists"}