You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Guillermo Pages 2dabc5056c feat: add tests 10 months ago
src feat: first publish 10 months ago
test feat: add tests 10 months ago
typings/ramda feat: first publish 10 months ago
.gitignore feat: first publish 10 months ago
README.md feat: first publish 10 months ago
package-lock.json feat: first publish 10 months ago
package.json feat: first publish 10 months ago
tsconfig.json feat: first publish 10 months ago

README.md

Swiss Army Knifey Ramda

Tools you could have gotten somewhere else, but you still decided to go this way.

Ramda Compose With Promise

Added typings to composeWithPromise

  it('should await and return a composed result', async function() {
    const paramToProp = (param: string) => ({ param });
    const sleepingSentence = (s: number) => async ({ param }: { param: string }) => {
      const d1 = new Date();
      await sleep(s, TimeUnit.second);
      const d2 = new Date();
      return `a_[${param}], slept for: ${d2.getTime() - d1.getTime()}`;
    };
    const toUp = async (param: string) => param.toUpperCase();
    const removeStart = async (param: string) => param.slice(1);
    const composed = composeWithPromise(
      removeStart,
      sleepingSentence(1),
      paramToProp,
      toUp,
      sleepingSentence(2),
      paramToProp
    );
    return expect(composed('hey')).to.eventually.match(/_\[A_\[HEY\], SLEPT FOR: \d{4}\], slept for: \d{3,4}$/g);
  });