-
-
Notifications
You must be signed in to change notification settings - Fork 834
feat: add utils/parse-ndjson
#1394
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
feat: add utils/parse-ndjson
#1394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
/stdlib update-copyright-years |
@maniksharma17 Thanks for your contribution! Overall it's coming along well and should be ready to merge soon; there are a bunch of lint errors currently (see CI); I will do a proper review tomorrow. |
@Planeshifter |
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
@Planeshifter hey, I updated the README to correct some errors. |
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
Reply to - #1399 (comment) @maniksharma17 I ran the benchmarks after setting up your branch on my system. |
@shubhexists Thanks for the help! |
utils/parse-ndjson
for ( let i = 0; i < out.length; i++ ){ | ||
if ( out[i] instanceof Error ){ | ||
b.fail( 'should return an array of JSON objects' ); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't include this much of an assertion within the code being measured. Prefer lightweight checks. See @stdlib/bench/harness
for benchmark guidance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lib/node_modules/@stdlib/utils/parse-ndjson/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maniksharma17 Thanks for working on this. At the moment, this contribution requires many changes. Please see other packages and try to match the style and conventions of those packages as closely as possible. E.g., ES5, documentation, spacing, etc. Until this package has been updated accordingly, we won't be able to merge.
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
Could you approve for workflows, and review it? |
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maniksharma17 Looks like there are still some lint errors. Make sure that you have your development environment properly initialized (make init
) and I also recommend installing an ESLint extension if you are using VSCode or Sublime Text, which should highlight lint errors directly in your editor. You can also run linting via the make lint commands.
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
lib/node_modules/@stdlib/utils/parse-ndjson/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/utils/parse-ndjson/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Manik Sharma <maniksharma.rke@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maniksharma17! Looks good now, will merge your contribution after CI passes! 🚀
@Planeshifter @kgryte |
Resolves #1075 .
Description
adding the package @stdlib/utils/parse-ndjson
The package is similar in structure as [@stdlib/utils/parse-json]
(lib/node_modules/@stdlib/utils/parse-json)
Package: @stdlib/utils/parse-ndjson
Alias: parseNDJSON
This pull request:
Related Issues
@stdlib/utils/parse-ndjson
#1075@stdlib/utils/parse-ndjson
#1075Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers