npm i -E @prelude/sorted-array
import * as Sa from '@prelude/sorted-array'
const xs = Sa.strings()
Sa.insert(xs, 'foo')
Sa.insert(xs, 'bar')
Sa.insert(xs, 'baz')
console.log(Sa.hasValue(xs, 'baz'))
This package is dedicated to the public domain under CC0 1.0.