
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
typescript-functors
Advanced tools
This is a very small libary for transforming objects into functors
npm install --save typescript-functors
import {Functor} from 'typescript-functors';
...
//To transform any object to a functor, just wrap it using Functor.of() and retrieve data using .get()
let obj = {...};
let functorObj = Functor.of(obj).get();
//You can map Arrays as usual
let arr: Array = [1,2,3];
let mapped: Array = Functor.of(arr).map(num=>num*2).get();
console.log(mapped); //[2,4,6]
//You can map Objects as well
let person = {
name: "Cersei",
family: "Lannister"
};
let name = Functor.of(person).map(obj=>obj.name).get();
console.log(name);// Cersei
//Or Arrays of Objects
let starks = [
{
name: "Eddard",
status: "Dead"
},
{
name: "Catelyn",
status: "Dead"
},
{
name: "Arya",
status: "Alive"
}
];
let names = Functor.of(starks).map(stark=>stark.name).get();
console.log(names);//["Eddard","Catelyn","Arya"]
FAQs
A very small library to transform ordinary objects to Functors
The npm package typescript-functors receives a total of 0 weekly downloads. As such, typescript-functors popularity was classified as not popular.
We found that typescript-functors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

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