MCPcopy Create free account
hub / github.com/Automattic/mongoose / timeStringToObject

Function timeStringToObject

test/types/schema.create.test.ts:1852–1855  ·  view source on GitHub ↗
(time: string)

Source from the content-addressed store, hash-verified

1850 });
1851
1852 const timeStringToObject = (time: string) => {
1853 const [hours, minutes] = time.split(':');
1854 return { hours: parseInt(hours), minutes: parseInt(minutes) };
1855 };
1856
1857 userSchema.pre('init', function(rawDoc) {
1858 ExpectAssignable<IUser>()(rawDoc);

Callers 1

gh15301Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected