luci-base: luci.js: add array sort utilities
authorJo-Philipp Wich <jo@mein.io>
Wed, 27 Jul 2022 14:31:10 +0000 (16:31 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 5 Dec 2022 09:46:26 +0000 (10:46 +0100)
commita19658aa7781f7d5ee6fb4f4e0c3d389e3d94ce3
tree33898bcb0a44d645fa112276ee4146b50d98e665
parent628c82b871c9d1b99a44bedf413837d47409b039
luci-base: luci.js: add array sort utilities

Add two new utility functions L.naturalCompare() and L.sortedArray() to
simplify sorting arrays naturally.

Ref: #5899
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8199b2ce9a7d36359aedea1ad9dab157134a46c2)
modules/luci-base/htdocs/luci-static/resources/luci.js