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

liftjs

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liftjs - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.editorconfig

23

package.json
{
"name": "liftjs",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/atomable/lift.js/",

@@ -9,6 +9,7 @@ "description": "lift.js is a compact monad opinionated javascript library",

"scripts": {
"pretest": "node_modules/.bin/babel ./src/lift.js -o ./test/lift.js",
"test": "node_modules/.bin/mocha --require babel-register --require babel-polyfill",
"prepublish": "node scripts/prepublish",
"coverage": "babel src/lift.js -o test/lift.js && babel test --out-dir babel && istanbul cover node_modules/mocha/bin/_mocha babel"
"pretest": "node scripts/compile",
"mocha": "mocha --require babel-register --require babel-polyfill",
"prepublish": "node scripts/compile",
"test": "eslint . && babel test --out-dir babel && istanbul cover node_modules/mocha/bin/_mocha babel",
"lint": "eslint ."
},

@@ -21,7 +22,15 @@ "author": "pre63",

"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-es2017": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babel-register": "^6.16.3",
"istanbul": "^0.4.5",
"mocha": "^3.1.2",
"should": "^11.1.1"
"should": "^11.1.1",
"eslint": "3.9.1",
"eslint-config-airbnb": "^13.0.0",
"eslint-plugin-import": "^2.1.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.6.0"
},

@@ -28,0 +37,0 @@ "bugs": {

@@ -0,1 +1,3 @@

[![atomable](https://img.shields.io/badge/atomable.io--blue.svg)](http://atomable.io)
[![Build Status](https://travis-ci.org/atomable/lift.js.svg?branch=master)](https://travis-ci.org/atomable/lift.js)
# lift.js — Write less code.

@@ -7,6 +9,8 @@

## Installation
#### [npm](https://www.npmjs.com/package/liftjs)
### [npm](https://www.npmjs.com/package/liftjs)
```
npm install liftjs
```
### [yarn](https://yarnpkg.com/)
```
yarn add liftjs

@@ -18,3 +22,3 @@ ```

#### importing
## Importing

@@ -30,7 +34,7 @@ All the following work, pick your demon. `lift.js` can be required directly for es next project or you can use the `lift-min.js` for all legacy applications.

import { Monad, Just, Maybe, Valid } from 'liftjs';
import { Monad, Just, Maybe, Valid, Curry } from 'liftjs';
```
## Monad factory
## Monad Factory
```

@@ -54,9 +58,9 @@ Monad(modifier[monad, value]: null) : unit

## lift (lifting)
## lift
With the `lift` function you can add function at any time on the monads.
```javascript
lift(name, func);
```
Monad[A].lift[name, func[A] : Monad[A]];
```
```javascript

@@ -121,3 +125,3 @@ const justWithLog = Just(5);

```
Monad[A].map(func[A] : B ) : Monad[B]
Monad[A].map[func[A] : B ] : Monad[B]
```

@@ -131,3 +135,3 @@ ```javascript

```
Monad[Monad[A]].join() : Monad[A]
Monad[Monad[A]].join[] : Monad[A]
```

@@ -140,3 +144,3 @@ ```javascript

```
Monad[A].toMaybe() : Maybe[A]
Monad[A].toMaybe[] : Maybe[A]
```

@@ -150,3 +154,3 @@ ```javascript

```
Monad[A].run(func[A] : null): Monad[A]
Monad[A].run[func[A] : null]: Monad[A]
```

@@ -180,3 +184,3 @@ ```javascript

```
Maybe[A].isNothing() : boolean
Maybe[A].isNothing[] : boolean
```

@@ -192,5 +196,5 @@ ```javascript

### is, alias: i
```javascript
Maybe[A].is() : boolean
```
Maybe[A].is[] : boolean
```
```javascript

@@ -206,3 +210,3 @@ const value = Maybe(5).is();

```
Maybe[A].or(B) : A or B
Maybe[A].or[B] : A or B
```

@@ -216,3 +220,3 @@ ```javascript

```
Maybe[A].else(Monad[B]) : Maybe[A] or Monad[B]
Maybe[A].else[Monad[B]] : Maybe[A] or Monad[B]
```

@@ -227,2 +231,17 @@ ```javascript

## Curry
`Curry` is a factory that takes a function and returs a curried function.
```
Curry(func) : func
```
```javascript
const curried = Curry((a, b) => a * b);
curried(3)(6);
// 18
Curry((a, b, c) => a + b + c)(1, 2, 3)
// 6
```
## Roadmap

@@ -229,0 +248,0 @@

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