webpipe
webpipe
npm i webpipe
webpipe

webpipe

JavaScript library for WebPipes. Use with Node.js, in the browser, or the command-line.

by webpipes

1.0.0 (see all)TypeScript:Not Found
npm i webpipe
Readme

webpipe.js

Javascript library for working with WebPipes. Use with Node.js or in the browser.

Build
Status GitHub file size in bytes

Installation

Just include the script. The webpipe object is automagically added to your environment. No need for new or any other sort of initialization.

Browser

<script src="https://unpkg.com/webpipe/webpipe.min.js"></script>

Or, use a specific version by replacing x.x.x:

<script src="https://unpkg.com/webpipe@0.4.5/webpipe.min.js"></script>

Node

Or, if you're using webpipe.js with node.js

$ npm [-g] install webpipe

Then require the "webpipe" module:

const webpipe = require('webpipe')

Usage

webpipe.js exposes two methods: webpipe.execute() and webpipe.options(). Use webpipe.options() to load a WebPipe's Block Definition. It can be handy while debugging and/or learning about new WebPipes. See examples/ for usage examples.

webpipe.execute(url, inputs, callback)

The real workhorse is webpipe.execute(). Use it to make a request to your WebPipe of choice.

const url = 'https://webpip.es/calculate-square-root'
const inputs = { radicand: 9 }

webpipe.execute(url, inputs, (err, outputs) => {
  if (err) {
    throw new Error(err.message)
  }
  console.log(outputs)
})

Suggestions

All comments in how to improve this library are very welcome. Feel free post suggestions to the Issue tracker, or even better, fork the repository to implement your own ideas and submit a pull request.

License

Unless attributed otherwise, everything is under the MIT License (see LICENSE for more info).

No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate