
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
Intended to protect us from api and name changes, allow us a single place to add our contributions, and potentially cherry pick the best higher order functions from multiple functional libraries.
The tooling for this project is pretty lightweight, and is run via npm. Currently available tasks:
There are a couple of githooks in resource/githooks that can be used to enforce build quality before pushing/committing - please ensure you install these to ./.git/githooks on your local machine if you wish to work on this project
From v6.2.0, this library no longer uses Babel. Node.js 20+ is required. All language features used are supported natively in Node 20, so this change does not affect runtime behavior or the public API.
Calls the fn with the data then attaches the result to the data under the supplied name.
This is the same as merge({name: fn(data)}, data)
A version of attachResult that can be used in a Promise chain and/or when the function returns a promise. for example:
const getAsyncCount = ({n}) => Promise.resolve(n + 1)
const data = {n: 5}
attachResultP("count", getAsyncCount, data)
// returns Promise[{n: 5, count: 6}]
Convenience wrapper for avoiding high-ceremony in compose chains. Does NOT require that you start with a Promise.
essentially the same as compose, but requires an array rather than a variable number of arguments
see composeList
returns a function that will return the evaluation of the function, or the (single) argument that was provided to the function
returns true if min <= val < max, that is, that val is between min and max where min is inclusive and max is exclusive.
returns true when val is any of null, undefined, "", {}, []
returns true when val is a JavaScript object, but not null or an array, which both normally have typeof being equal to "object"
applies the provided function to each of the keys on the provided object and returns the updated object
applies the lodash camelCase function to each of the keys on the provided object and returns the updated object
applies the lodash snakeCase function to each of the keys on the providd object and returns the updated object
Takes a function and a list, applies the function to each of the list's values, and returns a list of the same shape.
#####params
options Object
There is currently only one option
{concurrency: concurrencyLimit}The concurrency limit applies to Promises returned by the mapper function and it basically limits the number of Promises created. For example, if concurrency is 3 and the mapper callback has been called enough so that there are three returned Promises currently pending, no further callbacks are called until one of the pending Promises resolves. So the mapper function will be called three times and it will be called again only after at least one of the Promises resolves
fn function
The function to be called on every element of the input list
list Array
The list to be iterated over. Can be values or Promises
Returns Array: The new list of Promises
takes an array of functions, and partially applies the arguments to them
returns true when the named property is Nil
e.g.
propIsNil("a", {b: 1}) returns true
returns false when the named property is Nil. See propIsNil
returns true when the property described by the path is Nil
e.g.
pathIsNil(["a", "b"], {a: {item: "some-data"}}) returns true
returns false when the property described by the path is Nil. See pathIsNil
returns true when the named property is nil or empty. see isNilOrEmpty and propIsNil
returns true when the path is nil or empty. see isNilOrEmpty and pathIsNil
see composeAny. Functions processed left to right.
Returns the value of the property in an object, or runs the property through the supplied function
Given an object which describes a renaming pattern, and an object to rename, this function will return the original object with properties renamed according to the pattern
e.g.
rename({bigness: "size"}, {bigness: 4, species: "Elephant"})
// returns => {size: 4, species: "Elephant"}
Just like concat from ramda, but it does not cause an exception if a non-array is passed as either of the arguments, instead it acts as if an empty array was passed
Returns a new list by pulling every property of the object and transforming it into a new object with the key and the value of the original property
throws the error when the predicate is fulfilled by the data. Otherwise returns the data.
error can be either an Error or an error returning function, in which case it is passed the data
see throwWhen - works inside a promise chain
takes a predicate and an operation and produces a function. this function will return the evaluation of operation if predicate evaluates to true, or it will return the original value
see when. Works inside a promise chain.
takes an array of functions and wraps them in 'wrapper'
FAQs
functional programming library
The npm package @mft/fp receives a total of 671 weekly downloads. As such, @mft/fp popularity was classified as not popular.
We found that @mft/fp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 39 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.