mirror of
https://github.com/rizinorg/jsdec.git
synced 2026-11-09 04:39:32 -10:00
19 lines
419 B
JavaScript
19 lines
419 B
JavaScript
// SPDX-FileCopyrightText: 2019-2023 Giovanni Dante Grazioli <[email protected]>
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
/*
|
|
* Expects the icj json as input.
|
|
*/
|
|
export default function(icj) {
|
|
var data = {};
|
|
icj.forEach(function(x) {
|
|
data[x.addr.toString()] = x.classname;
|
|
});
|
|
this.data = data;
|
|
this.search = function(address) {
|
|
if (address) {
|
|
return this.data[address.toString()];
|
|
}
|
|
return null;
|
|
};
|
|
} |