MCPcopy Index your code
hub / github.com/foliojs/pdfkit / number

Method number

lib/object.js:164–170  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

162 }
163
164 static number(n) {
165 if (n > -1e21 && n < 1e21) {
166 return Math.round(n * 1e6) / 1e6;
167 }
168
169 throw new Error(`unsupported number: ${n}`);
170 }
171}
172
173export default PDFObject;

Callers 1

convertMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected