timers: allow timers to be used as primitives
This allows timers to be matched to numeric Ids and therefore used as keys of an Object, passed and stored without storing the Timer instance. clearTimeout/clearInterval is modified to support numeric/string Ids. Co-authored-by:Bradley Farias <bradley.meck@gmail.com> Co-authored-by:
Anatoli Papirovski <apapirovski@mac.com> Refs: https://github.com/nodejs/node/pull/21152 Backport-PR-URL: https://github.com/nodejs/node/pull/34482 PR-URL: https://github.com/nodejs/node/pull/34017 Backport-PR-URL: https://github.com/nodejs/node/pull/34482 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Bradley Farias <bradley.meck@gmail.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Signed-off-by:
Denys Otrishko <shishugi@gmail.com>
parent
b30b5187
Please register or sign in to comment