Skip to main content

Module ecmascript

Module ecmascript 

Source

Functions§

escape_line_terminators
Escapes the JS line terminators in text. A raw one ends a // comment, and the rest of text becomes code.
escape_non_ascii
escape_string_for_template_literal
Escape a string value as template literal raw text, without surrounding backticks. Raw text is source, so a lone surrogate is written as a \u escape.
is_path_like_specifier
Check if the specifier is a path-like specifier. E.g. ./foo, ../foo, /foo, C:\foo, file:///foo
is_relative_specifier
is_validate_assignee_identifier_name
is_validate_identifier_name
legitimize_identifier_name
legitimize_json_local_binding_name
none_preserved_keyword_or_global_object_ext
extra branches are used to avoid SyntaxError in strict mode
property_access_str
property_access_str_with_ascii
to_ecma_string_literal
to_module_import_export_name_with_ascii
to_usv_str
Converts a JavaScript string to UTF-8 the way URL and Node’s file system APIs do: each lone surrogate becomes U+FFFD. A module request with a lone surrogate then names the file the runtime would load.