locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
13 lines (12 loc) • 512 B
JavaScript
import { pythonCompare } from "../_helpers/_operator.js";
export function lt(a, b) {
// discuss at: https://locutus.io/python/operator/lt/
// parity verified: Python 3.12
// original by: Kevin van Zonneveld (https://kvz.io)
// note 1: Returns whether the left value is strictly less than the right value.
// example 1: lt(2, 3)
// returns 1: true
// example 2: lt('z', 'a')
// returns 2: false
return pythonCompare(a, b, 'lt') < 0;
}