@deno/kv
Version:
A Deno KV client library optimized for Node.js.
11 lines (10 loc) • 471 B
JavaScript
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
/** This module is browser compatible. */
/** Compares its two arguments for ascending order using JavaScript's built in comparison operators. */
export function ascend(a, b) {
return a < b ? -1 : a > b ? 1 : 0;
}
/** Compares its two arguments for descending order using JavaScript's built in comparison operators. */
export function descend(a, b) {
return a < b ? 1 : a > b ? -1 : 0;
}