You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/prefer-array-from.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,13 @@
2
2
* @license MIT
3
3
* @author Martin Giger
4
4
*/
5
-
"use strict";
6
5
7
6
constfirstElement=(array)=>{
8
7
const[element]=array;
9
8
returnelement;
10
9
};
11
10
12
-
module.exports={
11
+
exportdefault{
13
12
meta: {
14
13
docs: {
15
14
description: "Prefer using Array.from over spreading an iterable in an array literal. Using Array.from also preserves the original type of TypedArrays while mapping.",
0 commit comments