Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed deprecated warning for the Buffer.slice method #47

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

victorfreitas
Copy link
Contributor

@victorfreitas victorfreitas commented Sep 2, 2023

Moved to Buffer.subarray method of the Buffer API instead of the deprecated (since v16.x) method Buffer.slice.

// Deprecated "slice" method: @since v0.3.0
const buffer = Buffer.from('xxxxx', 'hex');
const bufferPart = buffer.slice(0, 16);
// Recommended "subarray" method: @since v3.0.0
const buffer = Buffer.from('xxxxx', 'hex');
const bufferPart = buffer.subarray(0, 16);

@MauriceButler MauriceButler merged commit dcf9c76 into MauriceButler:master Sep 4, 2023
@MauriceButler
Copy link
Owner

Thanks, released in version v6.3.0

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.

None yet

2 participants