Package Exports
- order-enforcer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (order-enforcer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
order-enforcer
Small library for verifying lists are in order. See tests for examples.
Functions
- isAscending(list, [path])
Determines if a list is sorted in ascending order.
- isDescending(list, [path])
Determines if a list is sorted in descending order.
isAscending(list, [path])
Determines if a list is sorted in ascending order.
Kind: global function
Throws:
TypeErrorif list is not an array or values to be compared are not a string or number
Returns: Boolean true if sorted
| Param | Type | Default | Description |
|---|---|---|---|
| list | Array.<*> |
list of items to determine if sorted | |
| [path] | String |
null |
for a list of objects, compares the value of the path of the object |
isDescending(list, [path])
Determines if a list is sorted in descending order.
Kind: global function
Throws:
TypeErrorif list is not an array or values to be compared are not a string or number
Returns: Boolean true if sorted
| Param | Type | Default | Description |
|---|---|---|---|
| list | Array.<*> |
list of items to determine if sorted | |
| [path] | String |
null |
for a list of objects, compares the value of the path of the object |
