UNPKG

@nestjs/schematics

Version:

The generators behind the Nest CLI: scaffold NestJS applications, libraries, modules, controllers, services and CRUD resources.

11 lines (10 loc) • 265 B
export function inPlaceSortByKeys(object) { const sorted = {}; const keys = Object.keys(object); keys.sort(); for (const key of keys) { sorted[key] = object[key]; delete object[key]; } return Object.assign(object, sorted); }