pfiffdeprecated

Faster, smaller, fully compatible Lodash alternative

Usage no npm install needed!

<script type="module">
  import pfiff from 'https://cdn.skypack.dev/pfiff';
</script>

README

pfiff

PLEASE NOTE THAT THE PROJECT IS IN DEVELOPMENT AND IS NOT YET A REPLACEMENT FOR LODASH

pfiff is a faster and smaller, yet fully compatible Lodash alternative. You'll whistle at how awesome it is!

  • pfiff is fast. Benchmarks coming soon
  • pfiff is small. All extreme edge-case code of Lodash is gone
  • pfiff is pure. Method arguments are never mutated
  • pfiff is modern. It is written explicitely in ES6
  • pfiff is safe. It is written in TypeScript and heavily tested

Install

Node

yarn add pfiff
# or
npm install pfiff

Browsers

<script src="https://cdn.jsdelivr.net/npm/pfiff/dist/pfiff.min.js"></script>

Usage

pfiff can be used as a drop-in replacement for Lodash:

import * as _ from "pfiff";
// or, if you really want to:
// const _ = require("pfiff");

const chunkedArray = _.chunk([1, 2, 3, 4, 5], 3); //=> [[1, 2, 3], [4, 5]]

You can also import each method separately to embrace the power of tree-shaking:

import { chunk } from "pfiff";

const chunkedArray = chunk([1, 2, 3, 4, 5], 3); //=> [[1, 2, 3], [4, 5]]