Updated extension: Sort

The Sort extension is now updated for compatibility macOS Monterey.

Sort-demo

Full Readme:

Sort

Sorts lines using a natural, case-insensitive sort. Empty lines are removed from the output.

Condition to appear: Input contains more than one line.

Requirements

Requires PopClip 2021.11 (3785).

Notes

The original PHP version used the natcasesort function, which is a case-insensitive natural ordering. (A natural ordering treats numbers as numeric values rather than character values, and so is more “human-like”.)

In porting to JavaScript I have used localeCompare with options {numeric: true, sensitivity: 'base'}.

Authors

Agassi, Nick Moore

Changelog

v3 - 1 Nov 2021

  • Re-implemented in JavaScript.

v2 - 17 Dec 2015

  • Modified to no longer remove duplicates.

v1 - 8 Feb 2013

  • Original extension (PHP) by Agassi.
3 Likes