A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/0711c08f779ac641ec42ecc96f604c8861008b28 below:

Remove unused argument in deepSortObject · npm/npm@0711c08 · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 1 file changed

+3

-5

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+3

-5

lines changed Original file line number Diff line number Diff line change

@@ -1,16 +1,14 @@

1 1

'use strict'

2 2

var sortedObject = require('sorted-object')

3 3 4 -

module.exports = function deepSortObject (obj, sortBy) {

4 +

module.exports = function deepSortObject (obj) {

5 5

if (obj == null || typeof obj !== 'object') return obj

6 6

if (obj instanceof Array) {

7 -

return obj.map(function (x) {

8 -

return deepSortObject(x, sortBy)

9 -

})

7 +

return obj.map(deepSortObject)

10 8

}

11 9

obj = sortedObject(obj)

12 10

Object.keys(obj).forEach(function (key) {

13 -

obj[key] = deepSortObject(obj[key], sortBy)

11 +

obj[key] = deepSortObject(obj[key])

14 12

})

15 13

return obj

16 14

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4