Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Leeruniek/functies

Repository files navigation

functies npm package version Coverage Status

Functional library for Javascript


Install

npm i --save-exact @leeruniek/functies

Use

import { pipe, trim, split, dropLast, push, join } from "@leeruniek/functies"

const removeTrailingSlash = source =>
  source[source.length - 1] === sep ? source.slice(0, -1) : source

const renameFile = newName => pipe(
  removeTrailingSlash,
  split(sep),
  dropLast,
  push(trim(sep)(newName)),
  join(sep)
)

Develop

git clone git@github.com:leeruniek/functies.git && \
  cd m && \
  npm run setup

# run tests (any `*.test.js`) once
npm test

# watch `src` folder for changes and run test automatically
npm run tdd

Docs

See documentation for the awesomeness that we are.

Changelog

History of all changes in CHANGELOG.md

0.34 - 7 May 2019

💥 Bracking change

  • debounce - docstring, react example, signature changed

Change

  • Remove docstring from test files
  • Add @see where suitable
  • deepEqual, elapsedTIme, distinct, endsWith, findIndexBy, find - add docstring
  • anyBy, allBy, countBy, filter, filterBy, findBy, remove - add docstring & tests
  • clone- add docstring & tests, simpler rewrite, added to main index
  • escape, escapeHTML, escapeRegExp - move into same file, add docstring
  • findFiles - add deprecation notice (use glob)

Remove

  • checkType - unused