Skip to content

Instantly share code, notes, and snippets.

@rolandpeelen
Created July 22, 2018 18:53
Show Gist options
  • Select an option

  • Save rolandpeelen/047c4eda66877db00580a3d0fb25e092 to your computer and use it in GitHub Desktop.

Select an option

Save rolandpeelen/047c4eda66877db00580a3d0fb25e092 to your computer and use it in GitHub Desktop.
Some different Syntaxes
const asHours = (duration) => {
 const stepOne = msToHours(duration);
 const stepTwo = valueIf(overOne(stepOne));
 const stepThree = falseOr(Math.round(stepTwo));
 const stepFour = falseOr(PostFixHours(stepThree));
 return stepFour;
}
// Or, if you're a mad man. Like this:
const asHours = (duration) => falseOr(postFixHours(falseOr(Math.round(valueIf(overOne(msToHours(duration)))))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment