---
title: "Formatted | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Class Formatted

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[sections](#sections)

### Methods[](#methods)

[isEmpty](#isempty) [toString](#tostring) [factory](#factory) [fromString](#fromstring)

## Constructors[](#constructors-1)

### constructor[](#constructor)

-   new Formatted(sections: [FormattedSection](https://docs.maptiler.com/sdk-js/api-reference/classes/FormattedSection/)\[\]): Formatted[](#constructorformatted)
    
    #### Parameters
    
    -   sections: [FormattedSection](https://docs.maptiler.com/sdk-js/api-reference/classes/FormattedSection/)\[\]
    
    #### Returns Formatted
    

## Properties[](#properties-1)

### sections[](#sections)

sections: [FormattedSection](https://docs.maptiler.com/sdk-js/api-reference/classes/FormattedSection/)\[\]

## Methods[](#methods-1)

### isEmpty[](#isempty)

-   isEmpty(): boolean[](#isempty-1)
    
    #### Returns boolean
    

### toString[](#tostring)

-   toString(): string[](#tostring-1)
    
    #### Returns string
    

### `Static`factory[](#factory)

-   factory(text: string | Formatted): Formatted[](#factory-1)
    
    #### Parameters
    
    -   text: string | Formatted
    
    #### Returns Formatted
    

### `Static`fromString[](#fromstring)

-   fromString(unformatted: string): Formatted[](#fromstring-1)
    
    #### Parameters
    
    -   unformatted: string
    
    #### Returns Formatted
