npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rewriting-lodash-functions

v1.1.0

Published

An npm module that contains 10 or more beautiful functions. Inspired by lodash.

Readme

The Silly Tortoise Function Hub

This is a library of commonly used JavaScript/JQuery/Lodash/Underscore methods with documentation and commenting using ES2015. This library is avaiable as an npm moodule for your enjoyment.

Why do you want our library?

  • you will learn JavaScript easily
  • you should use us with ES2015
  • your job will be so much easier

Specifications

Required

  • [ ] Includes a list of commonly used methods to rewrite in ES2015.
  • [ ] Includes a README that describes each method and provides an example of use.
  • [ ] Package is published with NPM.
  • [ ] Includes tests for all methods described.
  • [ ] This library includes 10 amazing easy to use functions.
  • [ ] The artifact produced is properly licensed, preferably with the [MIT license][mit-license].

The Silly Tortoise Function Hub

This is a library of commonly used JavaScript/JQuery/Lodash/Underscore methods. This library is avaiable as an npm moodule for your enjoyment.

Why do you want our library?

  • you will learn JavaScript easily
  • you should use us with ES2015
  • your job will be so much easier

Methods

Add

Adds two numbers

add(num1, num2)
add(6, 4);
// is 10

Chunk

Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will contain a remainder.

chunk(array, [size=1])
chunk(['a', 'b', 'c', 'd'], 2);
// is [['a', 'b'], ['c', 'd']]

chunk(['a', 'b', 'c', 'd'], 3);
// is [['a', 'b', 'c'], ['d']]

Compact

Creates an array with all falsey values removed.

compact([0, 1, false, 2, '', 3]);
// is [1, 2, 3]

Filter

Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The predicate is invoked with three arguments: (value, index|key, collection).

filter(collection, [predicate=_.identity])
var users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false }
];

filter(users, function(o) { return !o.active; });
// is objects for ['fred']

// The `_.matches` iteratee shorthand.
filter(users, { 'age': 36, 'active': true });
// is objects for ['barney']

// The `_.matchesProperty` iteratee shorthand.
filter(users, ['active', false]);
// is objects for ['fred']

// The `_.property` iteratee shorthand.
filter(users, 'active');
// is objects for ['barney']

Flow Right

It creates a function that invokes the given functions from right to left.

flowRight([funcs])
function square(n) {
  return n * n;
}

var addSquare = flowRight([square, add]);
addSquare(1, 2);
// is 9

isFunction

Checks if value is classified as a Function object.

isFunction(value)
isFunction(_);
// is true

 isFunction(/abc/);
// is false

Last

Gets the last element of array.

last(array)
last([1, 2, 3]);
// is 3

nth

Gets the element at index n of array. If n is negative, the nth element from the end is returned.

nth(array, [n=0])
var array = ['a', 'b', 'c', 'd'];

nth(array, 1);
// is 'b'

nth(array, -2);
// is 'c';

Reverse

Reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.

reverse(array)
var array = [1, 2, 3];

reverse(array);
// is [3, 2, 1]

console.log(array);
// is [3, 2, 1]

Slice

Creates a slice of array from start up to, but not including, end.

slice(array, [start=0], [end=array.length])

Subtract

Subtract two numbers.

subtract(minuend, subtrahend)
subtract(6, 4);
// is 2

Tail

Gets all but the first element of array.

tail(array)
tail([1, 2, 3]);
// is [2, 3]

Times

Invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index).

times(n, [iteratee=_.identity])
times(3, String);
// is ['0', '1', '2']

 times(4, _.constant(0));
// is [0, 0, 0, 0]