logo image npm version bundle size npm download deno land nest badge dependencies Status codecov Codacy Badge npm type definitions Commitizen friendly Gitmoji semantic-release code style: prettier

fonction

A modern practical functional library

✨ Feature

  • πŸ’š Friendly type definition
  • 🌎 Universal functions providing ESM and UMD
  • πŸ“¦ Optimized, super slim size
  • πŸ“„ TSDoc-style comments
  • πŸ”’ Bigint support
  • πŸ¦• Deno support

Fonction (French word for "function", not typoπŸ˜…) is modern practical functional library. Special attention is paid to bundle size and strict type definitions. Therefore, you can take out and use only what you want to use without worrying about the size.

πŸ“ Docs

Read the Docs to Learn More.

🚚 Install

npm i fonction
or
yarn add fonction

πŸ’« Usage

fonction provides multi platform modules.

πŸ¦• Deno

Click to toggle contents of `code`

deno.land

import { add } from 'https://deno.land/x/fonction@v1.3.0/mod.ts'

add(1, 2) // 3

nest.land

import { add } from 'https://x.nest.land/fonction@1.3.0/mod.ts'

add(1, 2) // 3

πŸ“¦ NPM

Click to toggle contents of `code`

ESM

import { add } from 'fonction'

add(1, 2) // 3

UMD

const { add } = require('fonction')

add(1, 2) // 3

🌐 CDN

Click to toggle contents of `code`

ESM

<script type="module">
  import { add } from 'https://unpkg.com/fonction?module'
  console.log(add(1, 2)) // 3
</script>

UMD

<script src="https://unpkg.com/fonction"></script>

<script>
  console.log(F.add(1, 2)) // 3
</script>

πŸ—ΊοΈ Loadmap

For the time being, my goal is to implement the functions implemented in the great starting projects (lodash, ramda, rambda, ... etc).

The release will be a public release when it is fully tested in the beta release and then merged into the main branch.

You can check the implementation status of all functions here.

You can also try all the features including the beta version with the following command or URL.

npm i fonction@beta
or
yarn add fonction@beta
// deno.land
import { _ } from 'https://deno.land/x/fonction@VERSION/mod.ts'

@VERSION format is like v1.5.0-beta.1.

πŸ’‘ License

MIT