- v2.1.0-beta.4Latest
- v2.1.0-beta.3
- v2.1.0
- v2.1.0-beta.2
- v2.1.0-beta.1
- v2.0.0
- v2.0.0-beta.1
- v1.10.0-beta.1
- v1.9.1-beta.1
- v1.9.0
- v1.9.0-beta.6
- v1.9.0-beta.5
- v1.9.0-beta.4
- v1.9.0-beta.3
- v1.9.0-beta.2
- v1.9.0-beta.1
- v1.8.1
- v1.8.1-beta.1
- v1.8.0
- v1.8.0-beta.8
- v1.8.0-beta.7
- v1.8.0-beta.6
- v1.8.0-beta.5
- v1.8.0-beta.4
- v1.8.0-beta.3
- v1.8.0-beta.2
- v1.8.0-beta.1
- v1.7.0
- v1.7.0-beta.3
- v1.7.0-beta.2
- v1.7.0-beta.1
- v1.6.2
- v1.6.2-beta.1
- v1.6.1
- v1.6.1-beta.1
- v1.6.0
- v1.6.0-beta.6
- v1.6.0-beta.5
- v1.6.0-beta.4
- v1.6.0-beta.3
- v1.6.0-beta.2
- v1.6.0-beta.1
- v1.5.1-beta.1
- v1.5.0
- v1.5.0-beta.4
- v1.5.0-beta.3
- v1.5.0-beta.2
- v1.5.0-beta.1
- v1.4.0
- v1.4.0-beta.2
- v1.4.0-beta.1
- v1.3.0
- v1.3.0-beta.5
- v1.3.0-beta.4
- v1.3.0-beta.3
- v1.3.0-beta.2
fonction
A modern practical functional library
β¨ Features
- π Friendly type definition
- :earth_americas: Universal functions providing ESM and Commonjs
- :package: Optimized, super slim size
- π TSDoc-style comments
- π’ Bigint support
- π¦ Deno support
Fonction (French word for βfunctionβ, not typo:sweat_smile:) 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
π Supports
The TypeScript version must be 4.3.0
or higher.
This project provide ES modules
and Commonjs
.
If you have an opinion about what to support, you can open an issue to discuss it.
The browserslist
has the following settings.
> 0.5%
last 1 version
not IE <= 11
not ie_mob <= 11
node 14
Deno |
Node.js |
Edge |
Firefox |
Chrome |
Safari |
iOS Safari |
Samsung |
Opera |
---|---|---|---|---|---|---|---|---|
^1.11.0 |
^14.16.0 |
^88 |
^86 |
^87 |
^13.1 |
^13.4 |
^13.0 |
^73 |
π« Usage
fonction
provides multi platform modules.
You can see all the functions here.
π¦ Deno
deno.land
import { add } from 'https://deno.land/x/fonction/mod.ts'
add(1, 2) // 3
nest.land
import { add } from 'https://x.nest.land/fonction@1.5.0/mod.ts'
add(1, 2) // 3
:package: Node.js
Install
npm i fonction
or
yarn add fonction
ESM
import { add } from 'fonction'
add(1, 2) // 3
Commonjs
const { add } = require('fonction')
add(1, 2) // 3
:globe_with_meridians: CDN
The module that bundles the dependencies is obtained from skypack.
<script type="module">
import { add } from 'https://cdn.skypack.dev/fonction'
console.log(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
.
β Other projects
:handshake: Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues.
π± Show your support
Give a βοΈ if this project helped you!
π‘ License
Copyright Β© 2021-present TomokiMiyauci.
Released under the MIT license