1.1.0 • Published 6 years ago

pipecompose v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago