New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

funk-lib

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

funk-lib

FP for Vanilla JavaScript

latest
Source
npmnpm
Version
0.16.0
Version published
Maintainers
1
Created
Source

funk-lib

ci npm module test coverage license: MIT

FP for Vanilla JavaScript

funk-lib is a standard library for full-stack functional programming with native JavaScript types. It is inspired by Ramda, but does not intend to duplicate Ramda's functionality. There is some overlap with core Browser and Node.js APIs, for the sake of normalization and isomorphism.

Features

Pure functions

Mostly. There are a few documented exceptions

Currying

All functions are curried, and arguments are arranged "data last" for useful partial application

Isomorphic

Packages are available for both

  • Node.js (CommonJS) - npm/funk-lib
  • Browser (ES Modules) - npm/funk-lib-es

Vast

Includes over 300 functions for working with

  • Async (promises)
  • Iterables (sync & async)
  • Type checking
  • Arrays and objects
  • Scalars (string, number)
  • Function composition
  • URLs
  • ... and more

For a full list of functions see the Documentation For The Latest Release

Install

npm i -P funk-lib
# or: es-module compatible build
npm i -P funk-lib-es

Import

const { mapKeys } = require('funk-lib/object');
// or: es-module compatible build
import { mapKeys } from 'funk-lib-es/object';

Development

Commands

$ npm run <command>

commanddescription
buildTranspile source
coverRun test coverage
initRe/Install deps
init:hardinit with a fresh package-lock
docsParse docs to JSON
lintLint the source
testRun tests
test:watchRun tests on change
verifyVerify linting, tests, coverage

Created by Colby Dauphinais

Keywords

async

FAQs

Package last updated on 13 Jan 2021

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