UNPKG

sorted-object

Version:

Returns a copy of an object with its keys sorted

12 lines (8 loc) 193 B
"use strict"; module.exports = function (input) { var output = {}; Object.keys(input).sort().forEach(function (key) { output[key] = input[key]; }); return output; };