# format (option)

Assigns a name to the formatting function.

import { format } from '@activewidgets/options';

const options = [
    format('fixed-2', function(value){
        return Number(value).toFixed(2);
    })
];

// ...

const columns = [
    {
        field: 'item_price',
        format: 'fixed-2'
    }
];