Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.
/ pipecompose Public archive

๐ŸŒ€ pipe and compose for every object

License

Notifications You must be signed in to change notification settings

rafaelkallis/pipecompose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

๐ŸŒ€ pipe and compose for every object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published