Skip to content

Replace deprecated Buffer constructor with Buffer.from()#14

Merged
tilfin merged 1 commit into
mainfrom
fix/deprecated-buffer-usage
May 6, 2026
Merged

Replace deprecated Buffer constructor with Buffer.from()#14
tilfin merged 1 commit into
mainfrom
fix/deprecated-buffer-usage

Conversation

@tilfin
Copy link
Copy Markdown
Owner

@tilfin tilfin commented May 6, 2026

This pull request updates the usage of the Buffer constructor to the safer and more modern Buffer.from() API in both the README.md and the example code. This change improves compatibility with newer Node.js versions and eliminates deprecation warnings.

Modernization of Buffer usage:

  • Replaced deprecated new Buffer(...) constructor calls with Buffer.from(...) in README.md code samples for both CommonJS and ES Module examples. [1] [2]
  • Updated example/example.js to use Buffer.from(...) instead of new Buffer(...).

@tilfin tilfin merged commit ad7c59f into main May 6, 2026
3 checks passed
@tilfin tilfin deleted the fix/deprecated-buffer-usage branch May 6, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant