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

indexOf that conforms to nodejs 10 tests #59

Merged
merged 2 commits into from Oct 4, 2018

Commits on Oct 3, 2018

  1. indexOf that conforms to nodejs 10 tests

    This is a JS implementation of indexOf for searching for BufferLists, Buffers, strings and numbers inside a BufferList. It passes the node 10 buffer indexof test suite and works on node 4+.
    
    There are quite of a few performance improvements possible, single byte search values can use the native Buffer.indexOf command. Multibyte buffer search values could too with some extra work. I don't believe searching for another buffer list can easily be made faster.
    
    This takes largely from two places and brings them together
    - The nodejs buffer index of tests https://github.com/nodejs/node/blob/5d8373a498a50b1387464391402ef22636439303/test/parallel/test-buffer-indexof.js
    - from @soldair's node-buffer-indexof https://www.npmjs.com/package/buffer-indexof
    reconbot committed Oct 3, 2018
    Copy the full SHA
    0d4d16a View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    104b478 View commit details
    Browse the repository at this point in the history