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

@yurkimus/curry

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yurkimus/curry - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

deno.lock

11

deno.json
{
"name": "@yurkimus/curry",
"version": "0.0.4",
"fmt": {
"semiColons": false,
"singleQuote": true
},
"exports": "./source/index.js"
"version": "0.0.5",
"exports": "./source/index.js",
"imports": {
"@yurkimus/types": "https://raw.githubusercontent.com/yurkimus/types/main/source/index.js"
}
}
{
"type": "module",
"version": "0.0.4",
"version": "0.0.5",
"name": "@yurkimus/curry",

@@ -5,0 +5,0 @@ "author": {

@@ -41,3 +41,3 @@ # Curry

```
curry :: function -> number -> function
curry :: Function -> Number -> Function
```

@@ -50,4 +50,4 @@

// predicate, no need to specify length unless using variadic function parameters
(a, b) => a + b
)(1)(2); // => 3
(a, b) => a + b,
)(1)(2) // => 3

@@ -58,4 +58,4 @@ curry(

// specified length to handle variadic function parameters
2
)(1)(2, 3); // => 6
2,
)(1)(2, 3) // => 6
```

@@ -62,0 +62,0 @@

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

import { is } from '@yurkimus/types'
/**

@@ -7,4 +9,2 @@ * Returns a curried version of a function.

*
* @returns {Function}
*
* @throws {TypeError} "predicate" must be a function

@@ -20,8 +20,8 @@ * @throws {TypeError} "length" must be a number

*/
export var curry = (predicate, length = predicate.length) => {
if (typeof predicate != "function")
throw new TypeError('"predicate" must be a function')
export let curry = (predicate, length = predicate.length) => {
if (typeof predicate !== 'function')
throw new TypeError(`Parameter 'predicate' must be a function.`)
if (Object.prototype.toString.call(length) != "[object Number]")
throw new TypeError('"length" must be a number')
if (!is('Number', length))
throw new TypeError(`Parameter 'length' must be a number.`)

@@ -28,0 +28,0 @@ return (...parameters) =>

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