pipecompose

1.1.0ย โ€ขย Publicย โ€ขย Published

pipecompose

trivial example
require('pipecompose');

const result = "hello".pipe(
  doubleSay,
  capitalize,
  exclaim,
);

result //=> "Hello, hello!"

function doubleSay (str) {
  return str + ", " + str;
}
function capitalize (str) {
  return str[0].toUpperCase() + str.substring(1);
}
function exclaim (str) {
  return str + '!';
}
promise example
const result = await "hello".pipe(
  doubleSay,
  capitalize,
  exclaim,
);

result //=> "Hello, hello!"

async function doubleSay (str) {
  return str + ", " + str;
}
function capitalize (str) {
  return str[0].toUpperCase() + str.substring(1);
}
async function exclaim (str) {
  return str + '!';
}

/pipecompose/

    Package Sidebar

    Install

    npm i pipecompose

    Weekly Downloads

    3

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    2.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • rafaelkallis