Skip to content

DTD file parser created especially for parsing Firefox localization files

Notifications You must be signed in to change notification settings

calibr/dtd-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just parse DTD files, especially created for Firefox localization DTD files

Install

npm i dtd-file

Usage

Parse dtd contents

var parser = require("dtd-file");

var res = parser.parse(dtdContents);
// if in dtdContents you have:
// <!entity key1 "value1">
// <!entity key2 "value2">
// in res you will get an object:
// {
//   "key1": "value1",
//   "key2": "value2"
// }

Stringify object to DTD file contents

var parser = require("dtd-file");

var res = parser.stringify({
  key1: "value1",
  key2: "value2"
});
// in res you will get
// <!ENTITY key1 "value1">
// <!ENTITY key2 "value2">

About

DTD file parser created especially for parsing Firefox localization files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published