Have ideas to improve npm?Join in the discussion! »

@oppie/short

0.1.0 • Public • Published

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.

Install

npm i @oppie/short

DownloadsWeekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

50.2 kB

Total Files

9

Last publish

Collaborators

  • avatar
  • avatar