inRange
"Dude, suckin' at something is the first step to being sorta good at something." —Jake, "Adventure Time"
本文为 《lodash 源码阅读》 系列文章,后续内容会在 github 中发布,欢迎 star,gitbook 同步更新。
依赖
源码
原理
inRange
主要对 baseInRange
多做了一个功能,便是判断 end
是否存在,如果 end
没有指定,那么 start
设置为 0,后将参数 Number
化传递给 baseInRange 进行区间判断。
相关链接
Last updated
Was this helpful?