Socket
Socket
Sign inDemoInstall

curry-rice

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    curry-rice

TypeScript-first curry function without upcast


Version published
Weekly downloads
588
decreased by-41.26%
Maintainers
1
Install size
21.9 kB
Created
Weekly downloads
 

Changelog

Source

v1.0.0-beta.1 (2021-06-14)

✨ New Features

Readme

Source

logo image

curry

TypeScript-first curry function without upcast

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

Deno: curry (deno.land, nest.land)

Node.js: curry-rice (npm)

The origin of the word curry-rice is Rice and curry 🍛.

:zap: Example

const replace = (from: string, to: string, val: string) => val.replace(from, to)
 const curriedReplace = curry(replace)
 const curriedReplace('hello', 'hi', 'hello world') // 'hi world'
 const curriedReplace('hello')('hi', 'hello world') // 'hi world'
 const curriedReplace('hello','hi')('hello world') // 'hi world'
 const curriedReplace('hello')('hi')('hello world') // 'hi world'

:dizzy: Usage

curry provides multi platform modules.

🦕 Deno

deno.land
import { curry } from "https://deno.land/x/curry/mod.ts";

curry(AnyFn);
nest.land
import { curry } from "https://x.nest.land/curry/mod.ts";

curry(AnyFn);

:package: Node.js

NPM package name is curry-rice .

Install
npm i curry-rice
or
yarn add curry-rice
ES modules
import { curry } from "curry-rice";

curry(AnyFn);
Commonjs
const { curry } = require("curry-rice");

curry(AnyFn);

:globe_with_meridians: Browser

The module that bundles the dependencies is obtained from skypack.

<script type="module">
  import { curry } from "https://cdn.skypack.dev/curry-rice";
  curry(AnyFn)
</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

Keywords

FAQs

Last updated on 14 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc