Skip to content

Instantly share code, notes, and snippets.

@protomorph
Created May 12, 2023 20:46
Show Gist options
  • Save protomorph/6a79eaef2be2cc5461f4f354bf65f166 to your computer and use it in GitHub Desktop.
Save protomorph/6a79eaef2be2cc5461f4f354bf65f166 to your computer and use it in GitHub Desktop.

Revisions

  1. protomorph created this gist May 12, 2023.
    2 changes: 2 additions & 0 deletions flatten.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@

    const flatten = (array, depth = Infinity) => array.flat(depth)