- Learning Node.js Development
- Andrew Mead
- 240字
- 2021-06-30 18:56:50
Using the utilities of lodash
With the exports in place, we can now take advantage of some of the utilities that come with Lodash. We'll quickly explore two in this section, and we'll be exploring more throughout the book since Lodash is basically just a set of really handy utilities. Before we do, we should take a look at the documentation so we know exactly what we're getting into.
On the npm page, click the lodash link given there, or go to lodash.com and click the API Documentation page, as shown here:

You can view all of the various methods you have available to you, as shown in the following screenshot:

In our case, we'll be using command + F (Ctrl + F for Windows users) to search for _.isString. Then in the docs, we can click on it, opening it up in the main page, as shown in the following screenshot:

The _.isString is a utility that comes with lodash, and it returns true if the variable you pass in is a string, and it returns false if the value you pass in is not a string. And we can prove that by using it over in Atom. Let's use this.
- 智慧城市:大數(shù)據(jù)、互聯(lián)網(wǎng)時代的城市治理(第4版)
- 社交網(wǎng)絡對齊
- 黑客攻防實戰(zhàn)技術完全手冊:掃描、嗅探、入侵與防御
- 物聯(lián)網(wǎng)識別技術
- Truffle Quick Start Guide
- Hands-On Industrial Internet of Things
- 計算機網(wǎng)絡與通信(第2版)
- 計算機網(wǎng)絡工程實用教程(第2版)
- Practical Web Design
- 智慧光網(wǎng)絡:關鍵技術、應用實踐和未來演進
- Spring 5.0 Projects
- 網(wǎng)絡基礎與網(wǎng)絡管理項目化教程
- 邁向自智網(wǎng)絡時代:IP自動駕駛網(wǎng)絡
- Mastering Dart
- 基于性能的保障理論與方法