core-fn

A collection of built-in object method and property as currying function

Usage no npm install needed!

<script type="module">
  import coreFn from 'https://cdn.skypack.dev/core-fn';
</script>

README

A collection of built-in object method and property as currying function

test GitHub release deno land nest badge deno doc deno version node support version npm download

GitHub (Pre-)Release Date dependencies Status codecov Codacy Badge npm type definitions Commitizen friendly Gitmoji semantic-release License: MIT


:sparkles: Features

  • :zap: Multi runtime support (Deno, Node.js and Browsers)
  • :books: Pure TypeScript and provides type definition
  • :earth_americas: Universal module, providing ES modules and Commonjs
  • :package: Optimized, super slim size
  • :page_facing_up: TSDoc-style comments

Package name

core-fn (deno.land, nest.land, npm)

:dizzy: Usage

core-fn provides multi platform modules.

🦕 Deno

deno.land

import { replace } from "https://deno.land/x/core-fn/mod.ts";

replace("hello")("hi", "hello Tom"); // 'hi Tom'

nest.land

import { replace } from "https://x.nest.land/core-fn/mod.ts";

replace("hello")("hi", "hello Tom"); // 'hi Tom'

:package: Node.js

Install

npm i core-fn
or
yarn add core-fn

ES modules

import { replace } from "core-fn";

replace("hello")("hi", "hello Tom"); // 'hi Tom'

Commonjs

const { replace } = require("core-fn");

replace("hello")("hi", "hello Tom"); // 'hi Tom'

:globe_with_meridians: Browser

The module that bundles the dependencies is obtained from skypack.

<script type="module">
  import { replace } from "https://cdn.skypack.dev/core-fn";
  console.log(replace('hello')('hi', 'hello Tom'); // 'hi Tom'
</script>

:green_heart: Supports

ie is no longer supported to reduce bundle size.

The TypeScript version must be 4.1.0 or higher.

This project provides 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.

defaults
last 8 version
not IE <= 11
not ie_mob <= 11
node 6
Deno
Deno
Node.js
Node.js
IE / Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Samsung
Samsung
Opera
Opera
^1.6.0 ^6.17.0 ^83 ^78 ^83 ^11 ^12.0 ^7.2 ^68

:handshake: Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues.

Contributing guide

:seedling: Show your support

Give a ⭐️ if this project helped you!

:bulb: License

Copyright © 2021-present TomokiMiyauci.

Released under the MIT license