Socket
Socket
Sign inDemoInstall

idf2json

Package Overview
Dependencies
58
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    idf2json

IDF, JSON, and their happy lives together


Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Install size
21.2 MB
Created
Weekly downloads
 

Readme

Source

idf2json

IDF, JSON, and their happy lives together

Getting Started

Install the module with: npm install idf2json

var idf2json = new require('idf2json')(options);

Options

Include any of the following options when instantiating:

  • idd_path - path to an IDD JSON file, used for annotating IDF files
  • idd_index - an in-memory object that represents the IDD in cache for IDF annotating

Methods

idf2json includes the following methods:

  • idd_to_json(text) - convert a text IDD into JSON
  • idf_to_json(text, options) - convert a text IDF into JSON. Include options.idd as an in-memory object to use for IDD annotations.
  • idd_for_idf(idf, options) - return relevant IDD entries for a given IDF JSON file. Include options.idd as an in-memory object to use for IDD annotations.
  • idd_json_to_xml(json) - convert an IDD JSON object to XML.
  • idf_json_to_xml(json) - convert an IDF JSON object to XML.
  • parse_file(path, options, callback) - read a text file at path, pass the resulting transformed JSON to callback. Include options.type = 'idd' for an IDD, otherwise defaults to an IDF. Include options.format = 'xml' to pass XML instead of JSON.
  • write_file(input_path, output_path, options, callback) - read a text file at input_path, transform it, and write to output_path. Include options.type = 'idd' for an IDD, otherwise defaults to an IDF. Include options.format = 'xml' to transform to XML instead of JSON.

License

Copyright (c) 2014 Buildlab All Rights Reserved.

FAQs

Last updated on 20 Oct 2014

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