readme-summarizer
v1.2.7
Published
Summaries Readme.md files into few sentences.
Downloads
8
Maintainers
Readme
Readme Summarizer
Summaries markdown readme files into few sentences. Get short description for any repository easily.
Installation
npm install --save readme-summarizer
Usage
Import library:
import { ReadmeSummarizer } from 'readme-summarizer';
Get readme summary from URL:
let readmeUrl = "https://raw.githubusercontent.com/bennymeg/ReadmeSummarizer/master/README.md";
let shortSummary = true;
// get readme summary asynchronously from URL
ReadmeSummarizer.fromUrl(readmeUrl, shortSummary).then((response) => {
console.log(response);
// prints: "Summaries markdown readme files into few sentences."
}).catch((error) => {
console.error('Error:', error);
});
Get readme summary from text:
let readmeAsText = "#Your markdown readme text string...";
let shortSummary = false;
// get readme summary from text string
ReadmeSummarizer.fromText(readmeUrl, shortSummary);
Supported Environments
- 💻 Browser (including browserify / webpack based environments [such as Angular])
- 🖥 Node.js
Documentation
- 🖋 Licence
Support
If you're having any problem, please raise an issue on GitHub and we'll be happy to help.
Contribute
Any help generifying this repository will be very much appreciated. Before submitting a pull request, please make sure that you include tests, and that jshint runs without any warnings: Download VSCode extension.
Test
Run the test suite by executing:
$ npm test
Author: Benny Megidish.