[JS] Lodash?

2022. 11. 14. 15:14EXPERIENCE/WEB | Java&Spring Framework

반응형

Lodash is a JavaScript library which provides utility functions for common programming tasks using the functional programming paradigm. Wikipedia

Initial release date: April 23, 2012 / LicenseMIT

Lodash는 함수형 프로그래밍 패러다임을 사용하여 일반적인 프로그래밍 작업을 위한 유틸리티 기능을 제공하는 JavaScript 라이브러리입니다.

 


 

A modern JavaScript utility library delivering modularity, performance & extras. 

모듈성, 성능 및 추가 기능을 제공하는 최신 자바스크립트 유틸리티 라이브러리입니다.


 

다운로드 | Download

Lodash is released under the MIT license & supports modern environments.Review the build differences & pick one that’s right for you.

Lodash는 MIT 라이선스에 따라 출시되었으며 최신 환경을 지원합니다. 빌드 차이점을 검토하고 적합한 것을 선택하십시오.

설치 방법 | Installation

브라우저에서 바로 사용하기 | In a browser:

<script src="lodash.js"></script>

NPM 사용하기 | Using npm:

$ npm i -g npm
$ npm i --save lodash

Node에서 사용하기 | In Node.js:

// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');

// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');

// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
 

노트 | Note:
Node.js < 6 REPL 에서 Lodash 사용을 위해 n_를 설치합니다.  

왜 Lodash 인가? | Why Lodash?

Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.Lodash’s modular methods are great for:

Lodash는 배열, 숫자, 객체, 문자열 등으로 작업하는 번거로움을 없애 JavaScript를 더 쉽게 만듭니다.Lodash의 모듈식 메서드는 다음과 같은 경우에 적합합니다.

  • Iterating arrays, objects, & strings 배열, 객체 및 문자열 반복
  • Manipulating & testing values 값 조작 및 테스트
  • Creating composite functions 복합 함수 만들기

 

모듈 형식 | Module Formats

Lodash is available in a variety of builds & module formats.

Lodash는 다양한 빌드 및 모듈 형식으로 제공됩니다.

보완 도구 | Complementary Tools

  • futil-js is a set of functional utilities designed to complement lodash

futil-js는 lodash를 보완하도록 설계된 기능 유틸리티 세트입니다.

추가 자료 | Further Reading

지원 | Support

Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12에서 테스트 되었습니다. 

 

 

Lodash

_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 });_.partition([1, 2, 3, 4], n => n % 2);DownloadLodash is released under the MIT license & supports modern environments. Review the build differences & pick one that’s right for you.InstallationIn

lodash.com

 

반응형