13 lines
410 B
JavaScript
13 lines
410 B
JavaScript
import percentRound from './percent-round.js';
|
|
//use percentRound on an AsyncTree array: first convert it to a normal array.
|
|
export default async function (asyncVals) {
|
|
const records = [];
|
|
for (const key of await asyncVals.keys()) {
|
|
const record = await asyncVals.get(key);
|
|
records.push(record.months);
|
|
}
|
|
console.log(records);
|
|
const foobar = percentRound(records, 3)
|
|
console.log(foobar);
|
|
}
|