MCPcopy Create free account
hub / github.com/ever-co/ever-demand / generateObjectIdString

Function generateObjectIdString

packages/common/src/utils.ts:130–139  ·  view source on GitHub ↗
(
	m = Math,
	d = Date,
	h = 16,
	s = (x) => m.floor(x).toString(h)
)

Source from the content-addressed store, hash-verified

128};
129
130export const generateObjectIdString = (
131 m = Math,
132 d = Date,
133 h = 16,
134 s = (x) => m.floor(x).toString(h)
135) => {
136 return (
137 s(d.now() / 1000) + ' '.repeat(h).replace(/./g, () => s(m.random() * h))
138 );
139};
140
141export function getIdFromTheDate(order: Order): string {
142 if (!order['createdAt'] || !order.orderNumber) {

Callers 2

watchLocationMethod · 0.90
AdminStorageServiceClass · 0.90

Calls 3

sFunction · 0.85
toStringMethod · 0.80
randomMethod · 0.45

Tested by

no test coverage detected