Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idf2json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idf2json

IDF, JSON, and their happy lives together

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 20 Oct 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc