binary string (ex. "1001")
associative array of name and index
array of names
This function converts from binary string to an array of names defined in namedb.
const db: Record<string, number> = { a: 0, b: 3, c: 8, d: 9, e: 17, f: 19 };
binstrtonamearray('1000000011', db) -> ['a', 'c', 'd']
binstrtonamearray(''000100001', db) -> ['b', 'c']
const db2: Record<string, number> = { "apple": 0, "orange": 1, "grape": 2, "mango", 3 };
binstrtonamearray('0101', db2) -> ['orange', 'mango']
binstrtonamearray('101', db2) -> ['apple', 'grape']
convert bit string to array of names to