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

taninsam

v1.17.0

Published

Documentation available in : https://evanliomain.github.io/taninsam

Readme

Taninsam

Documentation available in : https://evanliomain.github.io/taninsam

A functionnal library based on a powerfull chain mecanism.

Travis Coveralls Mutation testing badge

Greenkeeper badge Dependencies Dev Dependencies

styled with prettier Made with Commitizen friendly semantic-release

npm npm bundle size npm bundle size npm npm

npm

Why should I use Taninsam ?

Yes you could just use simple ESNext functions to do your transformation. If you enjoy with it, just keep it that way.

But sometime, the code don't feel linear, so you are tempted to use a library. So why this one, instead of another ?

Taninsam is:

  • Write in Typescript to enforced the feature correctness
  • Write in full TDD because is so easy to do it that way
  • Offer a simple way for chain function
  • Offer a constante way to code data transformation: no more function alias or 2 way to compose functions
  • Easy to extend: just chain a function

Getting started

Install taninsam:

npm install --save taninsam

or

yarn add taninsam

Import the librairie and start the chain:

import { chain, filter, map, sum } from 'taninsam';

// Sum square of even number in this collection
chain([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
  .chain(filter(x => 0 === x % 2)) // [2, 4, 6, 8, 10]
  .chain(map(x => x ** 2)) // [4, 16, 36, 64, 100]
  .chain(sum()) // 220
  .value();

To understand the chain function, it's as easy as this:

function chain(x) {
  return {
    chain: f => chain(f(x)),
    value: () => x
  };
}

So you can chain as much as function you want, and called value() at the end to get the actual value.

To extend the chain, it's as easy as to write a function:

import { chain } from 'taninsam';

chain(2)
  .chain(x => x ** 2)
  .chain(x => `square of 2 is {x}`)
  .value(); // 'square of 2 is 4'

Contributing

Installation

yarn

Coding

Main commands to develop

  • Use vscode for coding (or any other good editor that suite you)
  • yarn gen: Create a new function
  • yarn test:watch: Run test suite in interactive watch mode
  • yarn commit: Commit using conventional commit style

Additionals commands

  • yarn lint: Lints code
  • yarn test: Run test suite once
  • yarn stryker: Run mutation testing suite once
  • yarn build: Generate bundles and typings, create docs
  • yarn start: Runs npm run build in watch mode

Code source is automatically formatted and linted at each commit.

This library was bootstraped by typescript-library-starter.