Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomokimiyauci/fonction
A modern practical functional library
https://github.com/tomokimiyauci/fonction
deno fp functional library node tsdoc typescript
Last synced: 4 months ago
JSON representation
A modern practical functional library
- Host: GitHub
- URL: https://github.com/tomokimiyauci/fonction
- Owner: TomokiMiyauci
- License: mit
- Created: 2021-04-14T11:38:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T21:03:20.000Z (almost 2 years ago)
- Last Synced: 2024-10-20T03:11:24.923Z (4 months ago)
- Topics: deno, fp, functional, library, node, tsdoc, typescript
- Language: TypeScript
- Homepage: https://tomokimiyauci.github.io/fonction
- Size: 11.1 MB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
fonction
A modern practical functional library[![test](https://github.com/TomokiMiyauci/fonction/actions/workflows/test.yml/badge.svg)](https://github.com/TomokiMiyauci/fonction/actions/workflows/test.yml)
[![GitHub release](https://img.shields.io/github/release/TomokiMiyauci/fonction.svg)](https://github.com/TomokiMiyauci/fonction/releases)
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno&labelColor=black)](https://deno.land/x/fonction)
[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/fonction)
[![deno version](https://img.shields.io/badge/deno-^1.6.0-lightgrey?logo=deno)](https://github.com/denoland/deno)
![node support version](https://img.shields.io/badge/node-%5E14.16.0-yellow)
![bundle size](https://img.shields.io/bundlephobia/min/fonction)![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/TomokiMiyauci/fonction)
[![dependencies Status](https://status.david-dm.org/gh/TomokiMiyauci/fonction.svg)](https://david-dm.org/TomokiMiyauci/fonction)
[![codecov](https://codecov.io/gh/TomokiMiyauci/fonction/branch/main/graph/badge.svg?token=SPAi5Pv2wd)](https://codecov.io/gh/TomokiMiyauci/fonction)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f43b1c317e11445399d85ce6efc06504)](https://www.codacy.com/gh/TomokiMiyauci/fonction/dashboard?utm_source=github.com&utm_medium=referral&utm_content=TomokiMiyauci/fonction&utm_campaign=Badge_Grade)
![npm type definitions](https://img.shields.io/npm/types/arithmetic4)
![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)
![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat)
![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)
![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B26231%2Fgithub.com%2FTomokiMiyauci%2Ffonction.svg?type=small)](https://app.fossa.com/projects/custom%2B26231%2Fgithub.com%2FTomokiMiyauci%2Ffonction?ref=badge_small)---
## :sparkles: Features
- :green_heart: Friendly type definition
- :earth_americas: Universal functions providing ESM and Commonjs
- :package: Optimized, super slim size
- :page_facing_up: TSDoc-style comments
- :1234: Bigint support
- 🦕 Deno supportFonction (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.## :memo: Docs
[Read the Docs to Learn More.](https://tomokimiyauci.github.io/fonction/)
## :green_heart: Supports
The TypeScript version must be `4.1.0` or higher.
This project provide `ES modules` and `Commonjs`.
If you have an opinion about what to support, you can open an [issue](https://github.com/TomokiMiyauci/fonction/issues) to discuss it.
The `browserslist` has the following settings.
```bash
> 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.6.0` | `^14.16.0` | `^88` | `^86` | `^87` | `^13.1` | `^13.4` | `^13.0` | `^73` |## :dizzy: Usage
`fonction` provides multi platform modules.
You can see all the functions [here](https://tomokimiyauci.github.io/fonction/api/).
### 🦕 Deno
#### deno.land
```ts
import { add } from 'https://deno.land/x/fonction/mod.ts'add(1, 2) // 3
```#### nest.land
```ts
import { add } from 'https://x.nest.land/[email protected]/mod.ts'add(1, 2) // 3
```### :package: Node.js
#### Install
```bash
npm i fonction
or
yarn add fonction
```#### ESM
```ts
import { add } from 'fonction'add(1, 2) // 3
```#### Commonjs
```ts
const { add } = require('fonction')add(1, 2) // 3
```### :globe_with_meridians: CDN
The module that bundles the dependencies is obtained from [skypack](https://www.skypack.dev/view/fonction).
```html
import { add } from 'https://cdn.skypack.dev/fonction'
console.log(add(1, 2)) // 3```
## :world_map: Loadmap
For the time being, my goal is to implement the functions implemented in the great starting projects ([lodash](https://github.com/lodash/lodash), [ramda](https://github.com/ramda/ramda), [rambda](https://github.com/ramda/ramda), ... 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](https://tomokimiyauci.github.io/fonction/api/).
You can also try all the features including the `beta` version with the following command or URL.
```bash
npm i fonction@beta
or
yarn add fonction@beta
``````ts
// deno.land
import { _ } from 'https://deno.land/x/fonction@VERSION/mod.ts'
````@VERSION` format is like `v1.5.0-beta.1`.
## :star: Other projects
- [core-fn](https://github.com/TomokiMiyauci/core-fn)
- [is-valid](https://github.com/TomokiMiyauci/is-valid)## :handshake: Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues](https://github.com/TomokiMiyauci/fonction/issues).## :seedling: Show your support
Give a ⭐️ if this project helped you!
## :bulb: License
Copyright © 2021-present [TomokiMiyauci](https://github.com/TomokiMiyauci).
Released under the [MIT](./LICENSE) license
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B26231%2Fgithub.com%2FTomokiMiyauci%2Ffonction.svg?type=large)](https://app.fossa.com/projects/custom%2B26231%2Fgithub.com%2FTomokiMiyauci%2Ffonction?ref=badge_large)