mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Update doc examples to ES2015.
This commit is contained in:
@@ -13,9 +13,8 @@ import isError from './isError.js';
|
||||
* @example
|
||||
*
|
||||
* // Avoid throwing errors for invalid selectors.
|
||||
* var elements = attempt(function(selector) {
|
||||
* return document.querySelectorAll(selector);
|
||||
* }, '>_>');
|
||||
* const elements = attempt(selector =>
|
||||
* document.querySelectorAll(selector), '>_>');
|
||||
*
|
||||
* if (isError(elements)) {
|
||||
* elements = [];
|
||||
|
||||
Reference in New Issue
Block a user