UNPKG

@fruitsjs/contracts

Version:
14 lines (12 loc) 364 B
import {CodePageSize} from './constants'; /** * Counts the code pages for given machine code * * @param hexCode The contracts code in hex form * @return The number of code pages for the passed code * * @module contracts */ export function countCodePages(hexCode: string ): number { return Math.ceil((hexCode.length / 2) / CodePageSize); }