🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@darcytech/mini-lodash

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darcytech/mini-lodash

lodash 的阉割版,删除部分方法。

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

mini-lodash

lodash 的阉割版,删除部分方法。

内置 @types/lodash 的类型,但删除了被删除的函数的类型定义

删除会修改入参的方法

担心有人误使用这些方法直接修改 React state

_.pull,
  _.pullAll,
  _.pullAllBy,
  _.pullAllWith,
  _.pullAt,
  _.remove,
  _.assignIn,
  _.assignInWith,
  _.assignWith,
  _.defaults,
  _.defaultsDeep,
  _.merge,
  _.mergeWith,
  _.set,
  _.setWith,
  _.unset,
  _.update,
  _.updateWith;

删除已纳入 ECMAScript 规范的方法

减少对 lodash 的依赖,增强 Typescript 的类型意识

_.concat,
  _.fill,
  _.filter,
  _.flatMap,
  _.keys,
  _.map,
  _.reverse,
  _.slice,
  _.values,
  _.entries,
  _.every,
  _.find,
  _.findIndex,
  _.forEach,
  _.includes,
  _.indexOf,
  _.join,
  _.lastIndexOf,
  _.reduce,
  _.reduceRight,
  _.some,
  _.toString,
  _.split,
  _.endsWith,
  _.padEnd,
  _.padStart,
  _.repeat,
  _.replace,
  _.startsWith,
  _.trim,
  _.trimEnd,
  _.trimStart,
  _.now,
  _.isArray,
  _.assign,
  _.create;

删除的其他方法

_.get;

FAQs

Package last updated on 20 Apr 2026

Did you know?

Socket

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.

Install

Related posts