New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

102f

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

102f

A modern JS library based on 101

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

102

Build Status

A modern functionnal programming library based on 101. (This library is still in developpment.)

apply


apply.apply(fn, args)

Apply a function to an argument list.

Parameters

fn: function

args: array

Returns: any

Example:

let arr = [0, 1, 2, 3]
apply(Math.max, arr) // 3

compose


compose.compose(f, g)

Performs right-to-left function composition.

Parameters

f: function

g: function

Returns: function

Example:

var f = function(x){ return x * x}
var g = function(x){ return x + 2}
let composed = compose(f,g)

curry


curry.curry(f)

Returns a curried equivalent of the provided function.

Parameters

f: function

Returns: function

Example:

var multiplyFunction = function(x,y) { return x * y }
var curried = curry(f)
curried(2)(3) //6

isEmpty


isEmpty.isEmpty(val)

Returns true if the parameter is empty.

Parameters

val: any

Returns: boolean

Example:

var val = '';
isEmpty(val) // true

isInteger


isInteger.isInteger(val)

Returns true if the argument is an Integer.

Parameters

val: any

Returns: boolean

Example:

var val = 15;
isInteger(val) // true

isNumber


isNumber.isNumber(val)

Returns true if the argument is a Number.

Parameters

val: any

Returns: boolean

Example:

var val = 15.3;
isNumber(val)

map


map.map(f, array)

Parameters

f: function

array: Array

Returns: Array

Example:

var array = [0,1,2,3]
var result = map(x => x * 2, array) //[0,2,4,6]

mapFunctor


mapFunctor.mapFunctor()

Returns a new Functor.

Returns: Container


multiply


multiply.multiply(a, b)

Returns the multiplication of two Numbers.

Parameters

a: Number

b: Number

Returns: Number

Example:

var a = 2
var b = 3
var result = multiply(a)(b) //6

newContainer


newContainer.newContainer(arg)

Returns a new Container

Parameters

arg: any

Returns: Container

Example:

var Container1 = newContainer(2) //Container { _value: 2 }

FAQs

Package last updated on 31 Jan 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