mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:12:43 +00:00 
			
		
		
		
	 cd763de280
			
		
	
	
		cd763de280
		
	
	
	
	
		
			
			Since LibUnicode depends on this data it used to include Intl/AbstractOperations which in turn includes a number of other LibJS headers. By moving this to its own header with minimal includes we can save on rebuilding LibUnicode for unrelated LibJS header changes.
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Array.h>
 | |
| #include <AK/StringView.h>
 | |
| 
 | |
| namespace JS::Intl {
 | |
| 
 | |
| // Table 2: Single units sanctioned for use in ECMAScript, https://tc39.es/ecma402/#table-sanctioned-single-unit-identifiers
 | |
| constexpr auto sanctioned_single_unit_identifiers()
 | |
| {
 | |
|     return AK::Array { "acre"sv, "bit"sv, "byte"sv, "celsius"sv, "centimeter"sv, "day"sv, "degree"sv, "fahrenheit"sv, "fluid-ounce"sv, "foot"sv, "gallon"sv, "gigabit"sv, "gigabyte"sv, "gram"sv, "hectare"sv, "hour"sv, "inch"sv, "kilobit"sv, "kilobyte"sv, "kilogram"sv, "kilometer"sv, "liter"sv, "megabit"sv, "megabyte"sv, "meter"sv, "mile"sv, "mile-scandinavian"sv, "milliliter"sv, "millimeter"sv, "millisecond"sv, "minute"sv, "month"sv, "ounce"sv, "percent"sv, "petabyte"sv, "pound"sv, "second"sv, "stone"sv, "terabit"sv, "terabyte"sv, "week"sv, "yard"sv, "year"sv };
 | |
| }
 | |
| 
 | |
| // Additional single units used in ECMAScript required by the Intl.DurationFormat proposal
 | |
| constexpr auto extra_sanctioned_single_unit_identifiers()
 | |
| {
 | |
|     return AK::Array { "microsecond"sv, "nanosecond"sv };
 | |
| }
 | |
| 
 | |
| }
 |