New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json2md

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2md - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

lib/converters.js

@@ -59,2 +59,4 @@ "use strict";

converters.img = function (input, json2md) {
debugger;
if (Array.isArray(input)) {

@@ -61,0 +63,0 @@ return json2md(input, "", "img");

23

lib/index.js

@@ -66,4 +66,13 @@ "use strict";

return content.join("\n");
} else if (_type) {
var mdText = "";
var func = converters[_type || type];
if (typeof func === "function") {
mdText += indento(func(_type ? data : data[type], json2md), 1, prefix) + "\n";
} else {
throw new Error("There is no such converter: " + type);
}
return mdText;
} else {
var mdText = "";
var _mdText = "";
Object.keys(data).forEach(function (type, index, array) {

@@ -73,3 +82,3 @@ var func = converters[_type || type];

if (typeof func === "function") {
mdText += indento(func(_type ? data : data[type], json2md), 1, prefix) + "\n";
_mdText += indento(func(_type ? data : data[type], json2md), 1, prefix) + "\n";
} else {

@@ -79,3 +88,3 @@ throw new Error("There is no such converter: " + type);

});
return mdText;
return _mdText;
}

@@ -113,8 +122,8 @@ }

} else {
var type = Object.keys(data)[0],
func = converters[_type || type];
var _type2 = Object.keys(data)[0],
func = converters[_type || _type2];
if (typeof func === "function") {
return Promise.resolve().then(function () {
return func(_type ? data : data[type], json2md);
return func(_type ? data : data[_type2], json2md);
}).then(function (result) {

@@ -124,3 +133,3 @@ return indento(result, 1, prefix) + "\n";

}
throw new Error("There is no such converter: " + type);
throw new Error("There is no such converter: " + _type2);
}

@@ -127,0 +136,0 @@ });

{
"name": "json2md",
"version": "2.0.0",
"version": "2.0.1",
"description": "A JSON to Markdown converter.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -289,90 +289,107 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->

- `@sidneys/releasenotes`
- `@lm_fe/scripts`
- `@eventcatalog/utils`
- `@servable/manifest`
- `@best/github-integration`
- `@microfleet/schema2md`
- `@cypress/schema-tools`
- `@asyncapi/diff`
- `@best/github-integration`
- `@cypress/schema-tools`
- `@eventcatalog/utils`
- `@sidneys/releasenotes`
- `merak-compile`
- `@best/store`
- `jumia-travel-changelog`
- `npm-ex-xpi`
- `doc-vue3`
- `@feizheng/react-markdown-props`
- `heat-sfdx-tooling`
- `@cobalt-engine/change-logger`
- `lambda-docs-2md`
- `@lm_fe/scripts`
- `@myadbox/nebula-template-utils`
- `@aligov/module-doc`
- `@bonitasoft/dependency-list-to-markdown`
- `servable-manifest`
- `@gracexwho/model-card-generator`
- `rap2doc`
- `@dschau/gatsby-source-google-docs`
- `@gracexwho/model-card-generator`
- `rush-archive-project-plugin`
- `sfhdown`
- `tcdown`
- `bookmark2md`
- `@yiird-learn/vue3-ts-api-extractor`
- `cwq`
- `@bonitasoft/dependency-list-to-markdown`
- `github-repo-tools`
- `gridsome-source-google-docs`
- `notion2mdblog`
- `rap2doc`
- `kindle-highlights`
- `make-postgres-markdown`
- `cwq`
- `tcdown`
- `sfhdown`
- `@bwagener/gridsome-source-google-docs`
- `@dlsl/hardhat-markup`
- `@aligov/module-doc`
- `@opas/plugin-doc`
- `@xygengcn/koa-api-docs`
- `@dididc/dc-extension`
- `@flive/react-kit`
- `@xygengcn/koa-api-docs`
- `@shelex/schema-tools`
- `@apica-io/asm-auto-deploy`
- `parse-google-docs-json`
- `cli-demo3`
- `gatsby-source-gdocs2md`
- `@medyll/css-fabric-helper`
- `cli-demo3`
- `kbase-components`
- `lggn`
- `@e2y/bdd-dictionary-generator`
- `parse-google-docs-json`
- `lbdoc-p`
- `chdown-workers`
- `@bwagener/gridsome-source-google-docs`
- `doc-cli`
- `galaxy-vuepress-docs`
- `dargstack_rgen`
- `react-docgen-markdown`
- `lbdoc-p`
- `doc-vue3`
- `@e2y/bdd-dictionary-generator`
- `@medyll/css-fabric-helper`
- `@oasis-engine/oasis-run`
- `dargstack_rgen`
- `chdown-workers`
- `@feizheng/react-markdown-props`
- `@flive/react-kit`
- `@shelex/schema-tools`
- `@apica-io/asm-auto-deploy`
- `@haimmag/schema-tools`
- `rober19-config`
- `@klarna/postgres-to-docs`
- `gatsby-source-google-docs-sheets`
- `gatsby-source-google-docs`
- `rober19-config`
- `mokker`
- `@wii/swagger-plugin-transform-doc`
- `cloudcastsdown`
- `eddown`
- `msdown`
- `eddown`
- `laradown`
- `@s-ui/changelog`
- `@eventcatalogtest/plugin-doc-generator-asyncapi`
- `my_ccdown`
- `mokker`
- `gatsby-source-google-docs`
- `gatsby-source-google-docs-sheets`
- `platzi-virtual-machine`
- `chdown`
- `@yesand/asterism`
- `ccdown`
- `doc-vue`
- `@hitorisensei/monorepo-readme-generator`
- `uxcore-tools`
- `@gigsboat/cli`
- `joi-md-doc`
- `@everything-registry/sub-chunk-1986`
- `describe-dependencies`
- `lab-changelog`
- `collman`
- `doc-vue`
- `describe-dependencies`
- `node-red-contrib-json2md`
- `p2doc`
- `uxcore-tools`
- `@gigsboat/cli`
- `chdown`
- `ccdown`
- `@hitorisensei/markdown-readme-generator`
- `@eventcatalogtest/plugin-doc-generator-asyncapi`
- `@solarity/hardhat-markup`
- `@s-ui/changelog`
- `component-docs-2md`
- `codexer`
- `@balmacefa/function_tool_kit`
- `dokuinjs`
- `component-docs-2md`
- `gatsby-source-google-docs-team`
- `@mjefi/instags`
- `machine-ip`
- `flawed-code-scanner`
- `pantheon_site_management`
- `postgres-markdown`
- `reposier`
- `gatsby-source-google-docs-team`
- `work-webpack`
- `vue-md-gen`
- `@hitorisensei/markdown-readme-generator`
- `@jswork/react-markdown-props`
- `terraform2md`
- `solidity-benchmark`
- `type-graphql-to-md`
- `machine-ip`
- `terraform2md`
- `utterance-to-markdown`
- `@eventcatalog/plugin-doc-generator-asyncapi`
- `vue-md-gen`
- `@mjefi/instags`
- `@jswork/react-markdown-props`I am using this library to generate documentation for my projects, being integrated with [blah](https://github.com/IonicaBizau/node-blah).
- `type-graphql-to-md`
- `@cloudcatalog/cli`
- `@cloudcatalog/cli-test`I am using this library to generate documentation for my projects, being integrated with [blah](https://github.com/IonicaBizau/node-blah).

@@ -379,0 +396,0 @@

Sorry, the diff of this file is not supported yet

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