Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sorted-object.js « lib « sorted-object « node_modules « npm « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 26ebd500a357108fb03bb8c1972e3ef9f42c741e (plain)
1
2
3
4
5
6
7
8
9
10
11
"use strict";

module.exports = function (input) {
    var output = Object.create(null);

    Object.keys(input).sort().forEach(function (key) {
        output[key] = input[key];
    });

    return output;
};