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 + '!';
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    1
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    0

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