MCPcopy
hub / github.com/vercel/next.js / sorted

Function sorted

packages/create-next-app/templates/index.ts:19–27  ·  view source on GitHub ↗
(obj: Record<string, string>)

Source from the content-addressed store, hash-verified

17// prettier-ignore
18const nextjsReactPeerVersion = "19.2.4";
19function sorted(obj: Record<string, string>) {
20 return Object.keys(obj)
21 .sort()
22 .reduce((acc: Record<string, string>, key) => {
23 acc[key] = obj[key];
24
25 return acc;
26 }, {});
27}
28
29/**
30 * Get the file path for a given file in a template, e.g. "next.config.js".

Callers 1

installTemplateFunction · 0.85

Calls 3

reduceMethod · 0.80
keysMethod · 0.65
sortMethod · 0.45

Tested by

no test coverage detected