0.1.0 • Published 5 years ago
@oppie/short v0.1.0
short Node.js Library
Access to the short API from applications written in Node.js.
Documentation
See the API specification.
Installation
Install the package with the preferred package manager.
yarn add @oppie/short
--or--
npm install @oppie/short --save
Usage
Within four lines of code, content can be condensed and further implemented in an application.
// Require the short library with an API key.
const short = require('@oppie/short')('<API_KEY>');
// Create a new message containing the content to be condensed.
const msg = await short.digest({
content: 'Lorem ipsum dolor sit amet, elit purus eros id vitae sed blandit. Risus dui dui, vel vehicula erat sem...'
});
/**
* msg = {
* digest: 'Risus dui dui, vel vehicula erat sem...',
* inputLength: 270,
* outputLength: 123,
* reduction: 0.5444444444444445
* }
*/
Contributions
Contributions are welcomed at any time via pull request.
0.1.0
5 years ago