Conformance Examples 0.1.0 — Transforms: transform-sort¶
sort-numbers¶
A list of numbers is sorted in ascending numeric order.
Template
Context
Output
sort-strings¶
A list of strings is sorted in ascending lexicographic order.
Template
Context
Output
sort-by-numeric-property¶
With a property argument, structs are sorted by that numeric property.
Template
Context
Output
sort-by-string-property¶
With a property argument, structs are sorted by that string property.
Template
Context
Output
sort-empty-list¶
Sorting an empty list yields an empty list.
Template
Context
Output
sort-mixed-types-is-null¶
A list mixing numbers and strings is not uniformly comparable, so the result is null.
Template
Context
Output
sort-non-primitive-contents-is-null¶
Without a property, struct elements are not primitive keys, so the result is null.
Template
Context
Output
sort-property-non-struct-is-null¶
With a property, non-struct elements cannot supply the key, so the result is null.
Template
Context
Output
sort-property-missing-is-null¶
With a property, a struct missing that property cannot supply the key, so the result is null.
Template
Context
Output
sort-non-list-is-null¶
sort operates only on lists; a string input yields null.
Template
Context
Output
sort-strings-code-point-order¶
String ordering is by Unicode code point, so a BMP private-use character sorts before an astral character even though UTF-16 code-unit order would put the astral character's leading surrogate first.
Template
Context
Output
Source fixture: transforms/transform-sort.json