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

functionalscript

Package Overview
Dependencies
Maintainers
1
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functionalscript - npm Package Compare versions

Comparing version 0.0.127 to 0.0.128

33

lib/index.js

@@ -98,2 +98,31 @@ "use strict";

/**
* @template I
* @typedef {{
* readonly i: <O>(f: (input: I) => O) => Chain<O>
* readonly result: () => I
* }} Chain
*/
/** @type {<I>(value: I) => Chain<I>} */
const chain = value => ({
i: f => chain(f(value)),
result: () => value
})
/**
* @template I
* @template T
* @typedef {{
* readonly x: <O>(f: (v: T) => O) => Pipe<I, O>
* readonly f: (input: I) => T
* }} Pipe
*/
/** @type {<I, T>(f: (input: I) => T) => Pipe<I, T>} */
const pipex = f => ({
x: g => pipex(pipe(f)(g)),
f,
})
module.exports = {

@@ -128,6 +157,8 @@

pipex,
/** @type {Reduce<number, number>} */
sum: { merge: a => i => a + i, init: 0 },
/** @type {<I, X>(_: (_: I) => X) => <O>(_: Reduce<X, O>) => Reduce<I, O>} */
/** @type {<I, X>(f: (init: I) => X) => <O>(reduce: Reduce<X, O>) => Reduce<I, O>} */
map: f => ({merge, init}) => ({

@@ -134,0 +165,0 @@ merge: pipe(merge)(pipe(f)),

2

package.json
{
"name": "functionalscript",
"version": "0.0.127",
"version": "0.0.128",
"description": "FunctionalScript is a functional subset of JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

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