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

walrus-tools

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walrus-tools

Light FunCtional Tools for TypeScript and JavaScript.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Walrus Tools

Basic tooling for Functional programming using TypeScript. It works around TypeScript typing limitations for functional programming by creating standardized variations of common utilities as a workaround.

Basics and Caveats

PrefixMeaningCaveats
NoneNAAlways Curried, Generic <Input, Output>
dirDirectAll arguments at once, Generic <Input, Output>
pfPointfreeAlways Curried, Typed using any

Example:

// none
const numArr = [1, 2, 3];
const add2 = (x: number) => x + 2;
const add2ToArr = map<number, number>(add2);
const result = add2ToArr(numArr);

// dir
const numArr = [1, 2, 3];
const add2 = (x: number) => x + 2;
const result = dirMap<number, number>(add2, numArr);

// pf
const numArr = [1, 2, 3];
const add2 = (x: number) => x + 2;
const add2ToArr = pfMap(add2);
const result: number[] = add2ToArr(numArr);

Package Categories

The functions are separated in the following categories:

  • Utilities (IMPURE)
  • Iterable and Array Creators
  • Basic array Transformations
  • STRING and DATE Utils
  • Getters
  • Array Functions
  • Object and Array Utilities

Notes

Readme is a WIP

FAQs

Package last updated on 23 Dec 2020

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