Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arare

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arare

Lightweight auto-curried functional programming library

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

Arare

🍘 Lightweight auto-curried functional programming library
Header

Build Status

Description

Lightweight and without any external dependencies arare enables you to write tacit, point-free, declarative & clean code while avoiding side-effects and mutations. Internally the library itself, comprised of over 190 functions, follows the functional programming paradigm and is materialized using fundamental functional qualities such as currying, recursion, tail calls, high-order functions, referential transparency, side-effects elimination and function composition. Additionally, arare utilizes automatic variadic currying for its functions, thus allowing the user to write more flexible, practical & minimal code, compared to regular strict currying. Regular currying can still be achieved by applying one instead of multiple arguments at a time to a function. Finally, the library comes with a build-in interactive REPL environment, useful for directly inspecting and experimenting with all available modules without leaving the console.

Please note that project is in its early days and that it is currently under active development.

Come over to Gitter or Twitter to share your thoughts on the project.

Highlights

  • Over 190 available functions
  • Build-in interactive REPL
  • Point-free & tacit
  • High-order & pure functions
  • Automatic variadic currying
  • Declarative & minimal syntax
  • Side-effects & mutations free
  • Lightweight with zero dependencies
  • Build with functional code
  • Actively developed

Contents

Install

npm install arare

Usage

Import arare and start using directly any of the available modules.

const A = require('arare')

A.map(A.add(10), A.range(1, 4, 1)) //=> [11, 12, 13]

Alternatively, select and import only the modules that you need.

const {add, map, range} = require('arare')

map(add(10), range(1, 4, 1)) //=> [11, 12, 13]

REPL

Initially, install arare globally in order to be able to access the REPL environment.

npm install -g arare

To launch the REPL simply type arare from anywhere in your console.

arare # launch REPL
REPL

API

The following lists contain all available functions grouped into categories according to the type of their respective returning value.

Also, an alphabetically ordered list of all available functions can be found here.

Any
Functions whose return value varies according to their input.
Array
Functions whose return value is an array.
Boolean
Functions whose return value is a boolean.
Function
Functions whose return value is a function.
Number
Functions whose return value is a number.
String
Functions whose return value is a string.
Object
Functions whose return value is a plain object.
Undefined
Functions whose return value is undefined.

Development

  • Fork the repository and clone it to your machine
  • Navigate to your local fork: cd arare
  • Install the project dependencies: npm install or yarn install
  • Lint the code and run the tests: npm test or yarn test

Team

License

MIT

Keywords

FAQs

Package last updated on 12 Nov 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc