Content-Length: 548694 | pFad | http://github.com/lodash/lodash/pull/5766

F0 refactor: set timerId at startTimer by kim-jaedeok · Pull Request #5766 · lodash/lodash · GitHub
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

refactor: set timerId at startTimer #5766

Open
wants to merge 432 commits into
base: main
Choose a base branch
from

Conversation

kim-jaedeok
Copy link

Hi, I think there seems to be some code in debounce that could be improved a bit.
Now if we look at debounce's startTimer function, we can see that the return value is always used as timeId.
However, if you call startTimer and do not set the return value to timeId, a bug will likely occur.
I think you can reduce mistakes by setting the timeId internally rather than having startTimer return a timeId.
If you think the existing method is better, it would be good to let me know why.

megawac and others added 29 commits October 3, 2019 13:56
Since `function flow(funcs)` changed to `function flow(...funcs)` this ternary became unnecessary, since funcs will always have a length now.
The return type should be `boolean` instead of `number`
Remove the unused param `hash` from the jsdoc of `Hash#delete`
…dash#4681)

--save is a command-line option and it should be monospaced

Co-authored-by: utkarsh-kukreti <utkarshk@dewsolutions.in>
The `opt-cli` pre-push functionality was removed from lodash just a few days
after it was added (see lodash@2cd12c3),
but the documentation encouraging contributors to use it still remains.
Remove to avoid confusion for new contributors.
The master branch has been in flux for a pretty long time, so leaving
the broken npm scripts and messages in CONTRIBUTING.md doesn't make
sense and has been confusing to contributors. This commit removes broken
npm scripts and removes all unnecessary dependencies for now.
I've commented out a test for `_.merge` and will re-look it as I
gradually cleanup the codebase.
`npm cit` is short for `npm ci` and `npm test`
Signed-off-by: tison <wander4096@gmail.com>
* test: fix throttle.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix pickBy.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isBuffer.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix attempt.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix dropRightWhile.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix defer.spec.js and rest.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix invoke.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isArray.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix iteration-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix xor-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix property.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix ary.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix omit-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix debounce-and-throttle.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix unzip-and-zip.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix toPairs-methods.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix exit-early.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: temporarily comment out takeWhile and dropWhile tests

Signed-off-by: tison <wander4096@gmail.com>

* test: partially fix union*.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix startsWith-and-endsWith.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix isNil.spec.js

Signed-off-by: tison <wander4096@gmail.com>

* test: fix some of syntax errors

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lodash/lodash/pull/5766

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy