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

yank-down

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yank-down - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

11

package.json
{
"name": "yank-down",
"version": "0.2.1",
"version": "0.2.2",
"description": "Rearrange curried arguments",

@@ -20,5 +20,6 @@ "main": "index.js",

"scripts": {
"test": "mocha --require babel-register",
"test": "nyc --reporter=lcovonly mocha --require babel-register -R spec",
"build": "gulp build",
"clean": "gulp clean"
"clean": "gulp clean",
"prepare": "gulp build"
},

@@ -37,5 +38,7 @@ "devDependencies": {

"gulp-babel": "^6.1.2",
"mocha": "^3.2.0"
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"nyc": "^10.2.0"
},
"dependencies": {}
}

@@ -1,5 +0,10 @@

# Yank Down [![npm version](https://badge.fury.io/js/yank-down.svg)](https://badge.fury.io/js/yank-down) [![devpendencies](https://david-dm.org/Alex-Aralis/yank-down.svg)](https://david-dm.org/Alex-Aralis/yank-down)
Have you ever been unsure what value to pass first?
# Yank Down
[![npm version](https://badge.fury.io/js/yank-down.svg)](https://badge.fury.io/js/yank-down) [![devpendencies](https://david-dm.org/Alex-Aralis/yank-down.svg)](https://david-dm.org/Alex-Aralis/yank-down) [![Build Status](https://travis-ci.org/Alex-Aralis/yank-down.svg?branch=master)](https://travis-ci.org/Alex-Aralis/yank-down) [![codecov](https://codecov.io/gh/Alex-Aralis/yank-down/branch/master/graph/badge.svg)](https://codecov.io/gh/Alex-Aralis/yank-down)
Have you ever been unsure what value to pass first in a curried function?
```javascript

@@ -9,3 +14,3 @@ const divide = numerator => denominator => numerator/denominator;

but later found to your horror that it would have been better the other way around?
and ended up getting it wrong?

@@ -17,6 +22,6 @@ ```javascript

// ^^^^^^^^^
// not this would 3/number :/
// would return 3/number :/
```
Well then, say hello to yankDown, the titular function of this module.
Enter yankDown, the titular function of this module.

@@ -26,7 +31,7 @@ ```javascript

const flippedDivide = yankDown(divide)(1); // yank arg 1 to be first arg
const flippedDivide = yankDown(divide)(1); // yank arg 1 to be arg 0
const correctAnswer = needToBeDivided.map(flippedDivide(3));
// ^^^^^^^^^^^^^^^^
// arg 1 yanked down to arg 0 pos
// arg 1 yanked down to arg 0
```

@@ -50,3 +55,3 @@

_SO CONVENIENT~~~~_
_SO CONVENIENT_

@@ -69,3 +74,3 @@ ### Arbitrary Curry Depth

### Yank can be called using a binding.
### Yank supports binding syntax.

@@ -88,3 +93,3 @@ also, yankDown is exported as yank

## yank-down also has 2 other utility function
## yank-down also has 2 other utility functions

@@ -91,0 +96,0 @@ ### collect

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