Crate farmfe_utils

Crate farmfe_utils 

Source
Expand description

This crate provides shared utilities that is not related to any core compilation flow or data structures. If you are a plugin author and look for internal helpers, [farmfe_toolkit] crate should be your first choice.

Re-exports§

pub use nanoid;

Modules§

bytes_str
hash

Constants§

FARM_IGNORE_ACTION_COMMENT
FARM_IGNORE_ACTION_COMMENTS
PARSE_QUERY_TRUE

Functions§

diff_paths
Construct a relative path from a provided base directory path to the provided path.
file_url_to_path
is_skip_action_by_comment
parse_query
parse ?a=b to HashMap { a: b }, ?a to HashMap { a: "" }
relative
get platform independent relative path for example: from = “/desktop/farm/projects”, to = “/desktop/farm/documents/report.txt” the result will be “../documents/report.txt”
stringify_query
stringify Vec<(a, b)> to ?a=b. for example: vec![("a", "b")] to ?a=b vec![("a", "")] to ?a
transform_string_to_static_str