---
title: parseQuantityList
summary: Function in @sascom/commonjs.
order: 10
languages: [javascript]
sdk-package: JavaScript · @sascom/commonjs
---

# parseQuantityList

[[page:reference/javascript/api|API catalogue]] · `@sascom/commonjs` · Function

````typescript sdk=js sdk-namespace="@sascom/commonjs"
function parseQuantityList
````



## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/sascom-commonjs/parsequantitylist-857ca74a#member-sascom-commonjs-parsequantitylist-fc8c9f241bcc|parseQuantityList]] | Method | Parses several quantities, separated by "; " or ", " (a comma followed by a space), or each led by a label. An error's index points into the whole text. |

## `parseQuantityList` {#member-sascom-commonjs-parsequantitylist-fc8c9f241bcc}

````typescript sdk=js sdk-namespace="@sascom/commonjs"
parseQuantityList(text: string, options?: QuantityListOptions): QuantityParseError | { items: (ParsedQuantity & { label: string | null })[]; ok: true }
````

Parses several quantities, separated by "; " or ", " (a comma followed by a space), or each led by a label.
An error's index points into the whole text.

### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `string` |  |
| `options` | [[page:reference/javascript/sascom-commonjs/quantitylistoptions-980e7a96|QuantityListOptions]] |  |
