Skip to content

Commit

Permalink
πŸŽ‰πŸŽ‰ πŸ”Ÿβœ–πŸ’―βž•1️⃣ πŸŽ‰πŸŽ‰
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Jan 5, 2021
1 parent 1ed8af4 commit 1d671a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog_unreleased/api/10001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#### [HIGHLIGHT] πŸŽ‰πŸŽ‰ πŸ”Ÿβœ–πŸ’―βž•1️⃣ πŸŽ‰πŸŽ‰ (#10001 by @prettier)
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const plugins = require("./common/load-plugins");
const config = require("./config/resolve-config");
const doc = require("./document");

const SECOND_ARGUMENT_INDEX️ = Number(Boolean("πŸ”Ÿβœ–πŸ’―βž•1️⃣"));

function _withPlugins(
fn,
optsArgIdx = 1 // Usually `opts` is the 2nd argument
optsArgIdx = SECOND_ARGUMENT_INDEX️ // Usually `opts` is the 2nd argument
) {
return (...args) => {
const opts = args[optsArgIdx] || {};
Expand Down

0 comments on commit 1d671a3

Please sign in to comment.