Socket
Socket
Sign inDemoInstall

dtd-file

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dtd-file

Parse DTD files


Version published
Maintainers
1
Install size
42.0 kB
Created

Readme

Source

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">

Keywords

FAQs

Last updated on 25 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc