Skip to content

Commit

Permalink
$after 함수 내부에서 $appendTo -> $append 로 변경
Browse files Browse the repository at this point in the history
인자 순서 알맞게 적용하고 반환값을 새 엘리먼트로 맞추기 위해
  • Loading branch information
daengdaengLee authored and DoHyeong Lee committed Sep 23, 2020
1 parent 3a5daf8 commit 1e79423
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/after.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { curry } from "fxjs2";
import appendTo from "./appendTo.js";
import append from "./append.js";
import before from "./before.js";

export default curry((newEl, el) =>
el.nextSibling
? before(newEl, el.nextSibling)
: appendTo(newEl, el.parentNode)
el.nextSibling ? before(newEl, el.nextSibling) : append(newEl, el.parentNode)
);

0 comments on commit 1e79423

Please sign in to comment.