Skip to main content
Module

x/properties_deno/mod.ts>Properties

Read and write .properties files.
Latest
class Properties
import { Properties } from "https://deno.land/x/properties_deno@0.2.0/mod.ts";

Constructors

new
Properties(properties?: Map<string, string>)

Properties

properties: Map<string, string>

Methods

private
mapToString(input: Map<string, string>): string
private
validateKeys(map: Map<string, string>): void
load(filePath: string): Promise<void>

Reads a .properties file and store the key value pairs in a map. The keys can not be empty or contain whitespaces. On load the old properties will be discarded.

parse(text: string): void
store(filePath: string): Promise<void>

Writes the values of the map in a .properties file.