Skip to content

Commit

Permalink
ensure using newer implementation of Buffer.from
Browse files Browse the repository at this point in the history
Prior to Node v5.10 (and v4.5) it's impossible to use `Buffer.from` for creating buffers from string. Existence of `Buffer.alloc` implies the newer implementation of `Buffer.from` and possibility to use it with strings.
  • Loading branch information
pepkin88 authored and rhendric committed Jul 30, 2018
1 parent 03e8b66 commit 94f429b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ls
Expand Up @@ -26,7 +26,7 @@ parser <<<
@tokens = it
upcoming-input: -> ''

bufferFrom = Buffer.from or -> new Buffer it
bufferFrom = Buffer.alloc and Buffer.from or -> new Buffer it

exports <<<
VERSION: '1.5.0'
Expand Down

0 comments on commit 94f429b

Please sign in to comment.