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

fimp

v0.2.1

Published

Functional Immutable Programming

Readme

Fimp

Functional Immutable Programming

Fimp helps you work with Immutable.js data structures in a more functional way. Think of it as Ramda or lodash/fp for Immutable. It's 525 bytes uglified and gzipped.

Documentation

Fimp provides composable, curried, data-last functions that work with immutable objects. If you are used to functional programming you are hopefully thinking "Nice, this makes sense, I can use this". If not, you might be thinking "Why would I want this?".

The aim of Fimp is to help you write cleaner, more understandable code. Composable functions makes it easier to create more complex functions by combining smaller building blocks. (this article, explaining the rationale behind Ramda)[http://fr.umio.us/why-ramda/] applies to Fimp as well. The only difference is that Fimp is built for use with Immutable data structures, whereas Ramda is used with plain javascript object.

The following functions are supported:

compose

  const add5 = map((a) => a + 5)
  const filterEven = filter((a) => !(a % 2))
  const sum = reduce((total, a) => a + total, 0)
  const addFilterAndSum = compose(add5, filterEven, sum)

  addFilterAndSum(fromJS([1, 2, 3]) // 14

concat

  const concat456 = concat(fromJS([4, 5, 6]))
  concat456(fromJS([1, 2, 3])).toJS() // [1, 2, 3, 4, 5, 6]

contains

  const containsA = contains('a')
  containsA(fromJS(['a', 'b', 'c'])) // true

curry

  const subtract = curry((a, b) => b - a)
  const subtract2 = subtract(2)
  subtract2(3) // 1
  subtract(2, 3) // 1

entrySeq

  entrySeq(fromJS({a: 'foo', b: 'bar', c: 'baz'})).toJS()
  // [['a', 'foo'], ['b', 'bar'], ['c', 'baz']]

every

  const allEven = every(isEven)
  allEven(fromJS([1, 4, 8])) // false
  allEven(fromJS([2, 4, 100])) // true

filter

  const filterEven = filter(isEven)
  filterEven(fromJS([1, 2, 3, 4, 5, 6, 7, 8])).toJS() // [2, 4, 6, 8]

find

  const findEven = find(isEven)
  findEven(fromJS([1, 4, 3])) // 4

flatten

  const shallowFlatten = flatten(true)
  shallowFlatten(fromJS([1, 2, [3, 4, [5, 6]]])) // List [1, 2, 3, 4, [5, 6]]
  })

  const deeperFlatten = flatten(2)
  deeperFlatten(fromJS([1, 2, [3, 4, [5, [6]]]])) // List [1, 2, 3, 4, 5, [6]]
  })

  const deepFlatten = flatten(false)
  deepFlatten(fromJS([1, 2, [3, 4, [5, [6]]]])) //[1, 2, 3, 4, 5, 6])

get

  const user = fromJS({
    id: 1,
    address: {
      street: 'Simborgargatan 12',
    },
  })
  const getAddress = get(['address'])
  getAddress(user) // Map {street: 'Simborgargatan 12'}

keySeq

  keySeq(fromJS({a: 'foo', b: 'bar', c: 'baz'})).toJS() //['a', 'b', 'c']

map

  const add5 = map((a) => a + 5)
  add5(fromJS([1, 2, 3])) // List [6, 7, 8]

reduce

  const sum = reduce((a, b) => a + b, 0)
  sum(fromJS([1, 2, 3, 4, 5, 6])) // 21

reverse

  reverse(fromJS([1, 2, 3, 4, 5])).toJS() //[5, 4, 3, 2, 1]

set

const user = fromJS({
  id: 1,
  address: {
    street: 'Simborgargatan 12',
  },
})
  const setStreet = set(['address', 'street']) // Map user

skip

  const skip3 = skip(3)
  skip3(fromJS([1, 2, 3, 4, 5])).toJS() // [4, 5]

skipLast

  const skipLast3 = skipLast(3)
  skipLast3(fromJS([1, 2, 3, 4, 5])).toJS() // [1, 2]

some

  const someEven = some(isEven)
  someEven(fromJS([1, 4, 3])) // true

sort

  const sortHighest = sort((a, b) => b - a)
  sortHighest(fromJS([100, 20, 3, 44, 5])).toJS() // [100, 44, 20, 5, 3]

take

const take3 = take(3)
take3(fromJS([1, 2, 3, 4, 5])).toJS() // [1, 2, 3]

takeLast

  const takeLast3 = takeLast(3)
  takeLast3(fromJS([1, 2, 3, 4, 5])).toJS() // [3, 4, 5]

valueSeq

  valueSeq(fromJS({a: 'foo', b: 'bar', c: 'baz'})).toJS() // ['foo', 'bar', 'baz']