> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/seq/thru.md).

# \_.thru

**语法：**

```javascript
_.thru(value, interceptor)
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L8794)

**描述：**

这个方法类似[`_.tap`](https://lodash.com/docs/4.17.10#tap)， 除了它返回`interceptor`的返回结果。该方法的目的是"传递" 值到一个方法链序列以取代中间结果。

**开始版本：**&#x33;.0.0

**参数：**

* `value (*)`: 提供给 interceptor 的值。
* `interceptor (Function)`: 用来调用的函数。

**返回值：**

* `(*)`: 返回 interceptor 的返回结果。

**例子：**

```javascript
_('  abc  ')
 .chain()
 .trim()
 .thru(function(value) {
   return [value];
 })
 .value();
// => ['abc']
```
