aboutsummaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
authorTing Shu Lin <[email protected]>2020-08-01 01:02:45 +0900
committerGitHub <[email protected]>2020-08-01 01:02:45 +0900
commit7ab3d045e530ca72d9dabd067123b8854456c706 (patch)
tree8e93cf823843ea1e5e6f08ced0c11fe43e29579d /src/util.ts
parentCreate LICENSE (diff)
downloadholo-schedule-7ab3d045e530ca72d9dabd067123b8854456c706.tar.xz
holo-schedule-7ab3d045e530ca72d9dabd067123b8854456c706.zip
Add ESLint (#1)
* add eslint * eslint init * add lint command * update eslint rules * eslint auto-fix
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util.ts b/src/util.ts
index fbe87bb..07107ab 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,11 +1,11 @@
export function mapNodeList<E extends Element, T>(
list: NodeListOf<E>,
- mapper: (ele: E) => T
+ mapper: (ele: E) => T,
): T[] {
- const ary: T[] = [];
+ const ary: T[] = []
list.forEach((node) => {
- ary.push(mapper(node));
- });
+ ary.push(mapper(node))
+ })
- return ary;
+ return ary
}