MCPcopy Index your code
hub / github.com/sequelize/sequelize / getScale

Function getScale

src/dialects/mssql/query.js:14–19  ·  view source on GitHub ↗
(aNum)

Source from the content-addressed store, hash-verified

12const maxSafeIntegerAsBigInt = BigInt(Number.MAX_SAFE_INTEGER);
13
14function getScale(aNum) {
15 if (!Number.isFinite(aNum)) return 0;
16 let e = 1;
17 while (Math.round(aNum * e) / e !== aNum) e *= 10;
18 return Math.log10(e);
19}
20
21class Query extends AbstractQuery {
22 getInsertIdField() {

Callers 1

getSQLTypeFromJsTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected