summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatFunction.h
blob: b79618b90fc69034a4eae786cd76435e73c5f019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibJS/Forward.h>
#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/NativeFunction.h>

namespace JS::Intl {

class NumberFormatFunction final : public NativeFunction {
    JS_OBJECT(NumberFormatFunction, NativeFunction);

public:
    static NumberFormatFunction* create(GlobalObject&, NumberFormat&);

    explicit NumberFormatFunction(NumberFormat&, Object& prototype);
    virtual ~NumberFormatFunction() override = default;
    virtual void initialize(GlobalObject&) override;

    virtual ThrowCompletionOr<Value> call() override;

private:
    virtual void visit_edges(Visitor&) override;

    NumberFormat& m_number_format; // [[NumberFormat]]
};

}