-
-
Notifications
You must be signed in to change notification settings - Fork 847
feat: add array/base/with
#1374
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 array/base/with
#1374
Conversation
updates value at a particular index Fixes stdlib-js#1328
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. 🏃 💨
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.
Thank you for working on this; made a few changes and left a bunch of comments that will have to be addressed, but overall this is coming along well!
One important change we should make is throwing when the index is out of bounds to match the native Array.prototype.with method.
var bench = require( '@stdlib/bench' ); | ||
var rand = require( '@stdlib/random/base/randu' ); | ||
var pkg = require( '@stdlib/array/base/with/package.json' ).name; | ||
var value; |
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.
Let's declare this variable inside the benchmark function at L34, as we don't need it in the outer scope.
Signed-off-by: Philipp Burckhardt <[email protected]>
make suggested changes Fixes stdlib-js#1328
@Planeshifter @kgryte I have done the suggested changes. |
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
@Pratik772846 Thanks for your contribution and good catch concerning |
@Pratik772846 Would you mind checking the box in the OP that you read the contributing guidelines? We need to ensure that box is checked for all external contributions. Thanks! |
updates value at a particular index
Fixes #1328
Resolves # Issue 1328
Description
This pull request:
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers