mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
1682f0b760
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
31 lines
708 B
C++
31 lines
708 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
namespace JS {
|
|
|
|
class StringConstructor final : public NativeFunction {
|
|
JS_OBJECT(StringConstructor, NativeFunction);
|
|
|
|
public:
|
|
explicit StringConstructor(GlobalObject&);
|
|
virtual void initialize(GlobalObject&) override;
|
|
virtual ~StringConstructor() override;
|
|
|
|
virtual Value call() override;
|
|
virtual Value construct(Function& new_target) override;
|
|
|
|
private:
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
JS_DECLARE_NATIVE_FUNCTION(raw);
|
|
JS_DECLARE_NATIVE_FUNCTION(from_char_code);
|
|
};
|
|
|
|
}
|