Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
15 lines
420 B
Plaintext
15 lines
420 B
Plaintext
import { ArrayCreate } from "../262.js";
|
|
import "../types/number.js";
|
|
import { PartitionNumberPattern } from "./PartitionNumberPattern.js";
|
|
export function FormatNumericToParts(nf, x, implDetails) {
|
|
const parts = PartitionNumberPattern(implDetails.getInternalSlots(nf), x);
|
|
const result = ArrayCreate(0);
|
|
for (const part of parts) {
|
|
result.push({
|
|
type: part.type,
|
|
value: part.value
|
|
});
|
|
}
|
|
return result;
|
|
}
|