npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dctrl/json2doc

v1.0.6

Published

Converter JSON to DOC

Downloads

3

Readme

Json2Doc

Seamless API documentation generator from JSON specs. Transform Swagger or Postman collections into professional DOCX files in seconds.

npm version license


📦 Installation

npm install -g @dctrl/json2doc

Or use it locally in your project:

npm install --save-dev @dctrl/json2doc

🛠️ Usage

json2doc convert sample.json --platform=swagger

Options

| Option|Description| |-|-| | --platform=<platform>| Input type: swagger, postman| | --output <filename>| Output file path| | --template <file>| Path to custom DOCX template|

Example

Convert with file swagger.json to DOC:

json2doc convert sample.json --platform=swagger

Convert with file postman.json to DOC:

json2doc convert sample.json --platform=postman

Convert with custom output filename:

json2doc convert sample.json --platform=swagger --output=custome-api.docx

Convert with custom template:

json2doc convert sample.json --platform=swagger --template=custome-template.docx

Note: If you use the --template option, make sure your template file matches the format expected by json2doc.

For example, you can provide a template as shown below: Preview of sample document


📊 Structure Data

{
  "array": {
    "module": "Admin",
    "apis": [
      {
        "endpoint": "{baseUrl}/api/v1/admins",
        "method": "POST",
        "name": "Create Admin",
        "description": "Returns admin data",
        "headers": [
          {
            "value": "Authorization is required (ex: authorization: Bearer {token})"
          }
        ],
        "isHeaders": true,
        "parameters": [],
        "isParameters": false,
        "responses": [
          {
            "statusCode": "201",
            "description": "Successful Response",
            "content": "{\n  \"success\": true,\n  \"code\": 201,\n  \"message\": \"Data created successfully\",\n  \"data\": {\n    \"id\": \"ad42e763-7884-4fc2-83c4-8e61440ac4a4\",\n    \"email\": \"[email protected]\",\n    \"password\": \"$2a$10$gIjSA8bKO7bADCANmshDZOHJAO/br7FzJIu4nhgG/zYKP3UD0nc8O\",\n    \"roleId\": 1,\n    \"updatedAt\": \"2024-01-11T03:19:11.248Z\",\n    \"createdAt\": \"2024-01-11T03:19:11.248Z\",\n    \"deletedAt\": null\n  }\n}"
          },
        ],
        "isResponses": true,
        "body": "{\n  \"name\": \"string\",\n  \"phoneNumber\": \"string\",\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"roleId\": \"number\",\n  \"status\": \"string\"\n}",
        "isBody": true
      },
    ]
  }
}

📄 Output File

Preview of sample output


📄 License

This project is licensed under the MIT License – see the LICENSE file for details.