MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / inferParameters

Function inferParameters

lib/methods/table.js:174–183  ·  view source on GitHub ↗
({ length })

Source from the content-addressed store, hash-verified

172}
173
174function inferParameters({ length }) {
175 if (!Number.isInteger(length) || length < 0) {
176 throw new TypeError('Expected function.length to be a positive integer');
177 }
178 const params = [];
179 for (let i = 0; i < length; ++i) {
180 params.push(`$${i + 1}`);
181 }
182 return params;
183}
184
185const { hasOwnProperty } = Object.prototype;
186const { apply } = Function.prototype;

Callers 1

parseTableDefinitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected