Skip to content

Commit

Permalink
Merge pull request #24 from aiselp/main
Browse files Browse the repository at this point in the history
添加lodash说明文档
  • Loading branch information
kkevsekk1 authored Sep 30, 2023
2 parents f58ed41 + 8766420 commit c7c23ff
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions _sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
- [stream](/npm/stream)
- [event-stream](/npm/event-stream)
- [events](/npm/events)
- [lodash](/npm/lodash)

- [常见问题](/qa)
4 changes: 2 additions & 2 deletions npm/cheerio.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ ui.text2.setText(text)
这3种方法无论哪种都有些缺陷,第一种变量不是全局的则会报错,第二种字符串不能包含特殊字符,否则解析xml时报错,第三种调用安卓方法有一定的性能问题,且不够灵活。

使用`cheerio`则可以像这样处理:
```
const cheerio = require('npm/cheerio');
```js
const cheerio = require('cheerio');
let text = "变量文本"
let $ = cheerio.load( `<vertical>
<text class="text" textColor="#000000" textSize="18sp" maxLines="1" />
Expand Down
21 changes: 21 additions & 0 deletions npm/lodash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Lodash
v6.5.2新增
> <font color="#FF34FF17">稳定性: 稳定</font>
Lodash 是一个一致性、模块化、高性能的 JavaScript 实用工具库,使用方法请参阅[中文文档](https://www.lodashjs.com/),该模块不会自动加载,请使用以下方法导入
```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');
```
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7c23ff

Please sign in to comment.