aureooms/js-integer-little-endian

View on GitHub
src/1-new/convert/parse_keep_zeros.js

Summary

Maintainability
A
0 mins
Test Coverage
import { _int , convert_keep_zeros } from './' ;

export function parse_keep_zeros ( f , t , string ) {

    if ( f > 36 ) throw new Error('f > 36 not implemented') ;

    const n = string.length ;

    const a = [ ] ;

    for ( let k = 0 ; k < n ; ++k ) a.push( _int( string[k] ) ) ;

    return convert_keep_zeros( f , t , a , 0 , n ) ;

}