{"id":22812249,"url":"https://github.com/gnowoel/excerpts","last_synced_at":"2025-04-22T16:01:51.017Z","repository":{"id":44617915,"uuid":"51240302","full_name":"gnowoel/excerpts","owner":"gnowoel","description":"Excerpting words or characters of text from an HTML snippet.","archived":false,"fork":false,"pushed_at":"2017-12-14T08:19:11.000Z","size":9,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T14:44:19.649Z","etag":null,"topics":["excerpt","html-snippet"],"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/gnowoel.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":"2016-02-07T08:08:22.000Z","updated_at":"2024-04-19T12:46:15.000Z","dependencies_parsed_at":"2022-09-07T08:40:42.391Z","dependency_job_id":null,"html_url":"https://github.com/gnowoel/excerpts","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/gnowoel%2Fexcerpts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnowoel%2Fexcerpts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnowoel%2Fexcerpts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnowoel%2Fexcerpts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnowoel","download_url":"https://codeload.github.com/gnowoel/excerpts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250275397,"owners_count":21403674,"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":["excerpt","html-snippet"],"created_at":"2024-12-12T12:11:17.738Z","updated_at":"2025-04-22T16:01:50.506Z","avatar_url":"https://github.com/gnowoel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# excerpts [![Build Status](https://travis-ci.org/gnowoel/excerpts.svg?branch=master)](https://travis-ci.org/gnowoel/excerpts)\n\nExcerpting words or characters of text from an HTML snippet.\n\n## Installation\n\n```\n$ npm install excerpts\n```\n\n## Usage\n\nGiven HTML snippet:\n\n``` html\n\u003cp\u003eLorem \u003ci\u003eipsum\u003c/i\u003e dolor \u003cem\u003esit\u003c/em\u003e amet.\u003c/p\u003e\n```\n\n### Words\n\nExcerpting words with the `words` option:\n\n```javascript\nvar excerpts = require('excerpts');\nvar text = excerpts(html, { words: 3 });\n//=\u003e Lorem ipsum dolor...\n```\n\n### Characters\n\nExcerpting characters with the `characters` option:\n\n```javascript\nvar excerpts = require('excerpts');\nvar text = excerpts(html, { characters: 10 });\n//=\u003e Lorem ipsum dol...\n```\n\nThe `words` option takes precedence over the `characters` option. By default, 50 words will be extracted when options are missing.\n\n### Appendix\n\nThe appendix can be customized with the `append` option:\n\n```javascript\nvar excerpts = require('excerpts');\nvar text = excerpts(html, { words: 3, append: ' \u003e\u003e' });\n//=\u003e Lorem ipsum dolor \u003e\u003e\n```\n\nThe appendix won't appear when full text has been extracted.\n\n## Tests\n\n```\n$ npm install\n$ npm test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnowoel%2Fexcerpts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnowoel%2Fexcerpts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnowoel%2Fexcerpts/lists"}