Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash-f

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

lodash-f

基于 lodash 实现上层的工具方法集

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lodash-f

基于 lodash 实现上层的工具方法集

Getting Started

Install dependencies,

$ npm i

Start the dev server,

$ npm start

Build documentation,

$ npm run docs:build

Build library via father-build,

$ npm run build

findItem

findItem(array, validateKey, validateValue, [targetKey]=undefined)

“Array” 方法,根据指定的 key 和 value 循环数组得到目标数据后按规则取出,规则可不填

参数
  • array (Array): 数据源。
  • validateKey (string): 需要循环验证的 key。
  • validateValue (var): 需要循环验证的 value。
  • targetKey: 按规则取出。
import { findItem } from 'lodash-f';

const arr = [
  { a: 1, b: 11 },
  { a: 2, b: 22 },
];

findItem(arr, 'a', 2, 'b')

// => 22

FAQs

Package last updated on 04 Aug 2020

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

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