This commit is contained in:
hatuhn
2019-09-13 09:44:33 +07:00
parent 1f1633e801
commit f14a34ba19
16798 changed files with 1652961 additions and 4327 deletions
+10
View File
@@ -0,0 +1,10 @@
"use strict";
if (!require("./is-implemented")()) {
Object.defineProperty(Math, "clz32", {
value: require("./shim"),
configurable: true,
enumerable: false,
writable: true
});
}
+3
View File
@@ -0,0 +1,3 @@
"use strict";
module.exports = require("./is-implemented")() ? Math.clz32 : require("./shim");
+7
View File
@@ -0,0 +1,7 @@
"use strict";
module.exports = function () {
var clz32 = Math.clz32;
if (typeof clz32 !== "function") return false;
return clz32(1000) === 22;
};
+7
View File
@@ -0,0 +1,7 @@
"use strict";
module.exports = function (value) {
// eslint-disable-next-line no-bitwise
value >>>= 0;
return value ? 32 - value.toString(2).length : 32;
};