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

Function pad

test/integration/model/create.test.js:966–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964 const user0 = await userWithDefaults.findByPk(user.id);
965 const now = new Date();
966 const pad = number => number.toString().padStart(2, '0');
967
968 expect(user0.year).to.equal(`${now.getUTCFullYear()}-${pad(now.getUTCMonth() + 1)}-${pad(now.getUTCDate())}`);
969

Callers 1

create.test.jsFile · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected