Skip to content

Commit

Permalink
πŸ› Avoid error on non-Node.js environments
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Jul 29, 2021
1 parent a928ba1 commit 570bcec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
var toString = Object.prototype.toString

var isModern = (
typeof Buffer !== 'undefined' &&
typeof Buffer.alloc === 'function' &&
typeof Buffer.allocUnsafe === 'function' &&
typeof Buffer.from === 'function'
Expand Down

0 comments on commit 570bcec

Please sign in to comment.