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

Update Deprecated Function Calls #118

Merged
merged 4 commits into from
Feb 10, 2024
Merged

Update Deprecated Function Calls #118

merged 4 commits into from
Feb 10, 2024

Conversation

wilwade
Copy link
Member

@wilwade wilwade commented Feb 9, 2024

  • Buffer.slice -> Buffer.subarray (and correct test that wasn't using buffers)
  • new Buffer(array) -> Buffer.from(array)
  • Fix issue with npm run serve

Via looking into #117 As subarray is slightly faster in the browser shim.

@@ -2,7 +2,7 @@ import * as rle from './rle'
import { Cursor, Options } from './types'

export const decodeValues = function(type: string, cursor: Cursor, count: number, opts: Options) {
const bitWidth = cursor.buffer.slice(cursor.offset, cursor.offset+1).readInt8(0);
const bitWidth = cursor.buffer.subarray(cursor.offset, cursor.offset+1).readInt8(0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on with the new! 👍

Copy link
Collaborator

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this.

@wilwade wilwade merged commit 91fc71f into main Feb 10, 2024
1 check passed
@wilwade wilwade deleted the chore/slice-to-subarray branch February 10, 2024 00:44
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.

3 participants