Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
THE PROJECT IS IN DEVELOPMENT AND IS NOT YET A REPLACEMENT FOR LODASH
lo-fns is a faster and smaller, yet fully compatible Lodash alternative.
First of all I want to say that Lodash is great. It is an incredible toolset. However, I have some problems with it. Lodash is old (10+ years), and a lot of code targets old browsers and runtimes. The code is not tree-shakable, which makes Lodash a dependency so big, it spawned memes around the topic.
lo-fns is my attempt to rethink Lodash in a modern way. Lodash functions try to save the end user from shooting themselves in a leg by extra checks for argument types and values. My approach is to replace this with robust type definitions and tests to make sure the functions work as expected.
The functions will be exported as ES6 modules from the start, and importing them separately from each other is the intended way to use them. Tree-shaking is available in virtually every bundler, so it is silly not to take advantage of it.
In the end, I will try to make lo-fns not only a lighter, but also a faster version of Lodash (if this renders to be possible). Despite our machines being able to achive things that were unachievable a few years ago, there is still no point in using extra power when it is possible not to do so.
yarn add lo-fns
# or
npm install lo-fns
<script src="https://cdn.jsdelivr.net/npm/lo-fns/dist/lo-fns.min.js"></script>
Import functions as you need them:
import { chunk } from "lo-fns";
const chunkedArray = chunk([1, 2, 3, 4, 5], 3); //=> [[1, 2, 3], [4, 5]]
lo-fns can also be used as a drop-in replacement for Lodash:
import * as _ from "lo-fns";
// or, if you really want to:
// const _ = require("lo-fns");
const chunkedArray = _.chunk([1, 2, 3, 4, 5], 3); //=> [[1, 2, 3], [4, 5]]
FAQs
Faster, smaller, fully compatible Lodash alternative
The npm package lo-fns receives a total of 0 weekly downloads. As such, lo-fns popularity was classified as not popular.
We found that lo-fns 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.