Skip to content

About

A Node.js wrapper for the short API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

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.

About

A Node.js wrapper for the short API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages