Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Avoid using deprecated Buffer API #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ChALkeR
Copy link

@ChALkeR ChALkeR commented Mar 22, 2018

Use Buffer.from when it's available instead of new Bufer(string)

Fixes: #60
Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
Tracking: nodejs/node#19079

Given that this is a highly popular module and that Buffer constructor was used in a single place, I decided to add a minimal polyfill in-place (like I do in other similar situations) instead of adding a dependnecy.

/cc @zkat

Use Buffer.from when it's available instead of 'new Bufer(string)'

Fixes: npm#60
Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant