Skip to content

Instantly share code, notes, and snippets.

@servatj
Created June 6, 2019 21:15
Show Gist options
  • Save servatj/e94b538fd67b85aeacb20d068b12e75c to your computer and use it in GitHub Desktop.
Save servatj/e94b538fd67b85aeacb20d068b12e75c to your computer and use it in GitHub Desktop.

Revisions

  1. servatj created this gist Jun 6, 2019.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    const falsyValues = [undefined, null, 0, '', NaN]
    const isTruthy = (value) => !falsyValues.includes(value)