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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jsconv

v1.7.0

Published

Convert Javascript Data to Python through JSON files

Downloads

5

Readme

jsconv

A Library to convert Javascript data to Python through JSON files. Read, Write, and Update data using Jsconv, which can be read through Python scripts.

Installation and use

Prerequisite:

Install jsconv:

npm install jsconv

Importing Jsconv to your Program

const { jsconv_init } = require('jsconv')

Full npm script reference

Initialization

To begin using jsconv, it is essential that you initialize a filepath of the desired json file to read, write, and update data. This can be done so with the following syntax:

const jsconv_var = jsconv_init('FILEPATH_OF_JSON')

Note: If the filepath is not in string format an error will be thrown. View the Errors section of the documentation to learn more.

Reading JSON data

Jsconv returns all data from json in the form of a dictionary with the following syntax:

const returned_data = jsconv_var.readjs()

Note: Filepath must be valid or an error will be prompted.

Jsconv will return null if there is no data on the json file.

Writing to JSON

Write data to JSON in the form of a key, value pair as so:

jsconv_var.writejs('KEY', 'VAL')

If the key has not been used to store data in the json, a new entry will appear on the file. However, if the key has already been used, the new data will override the old data by nature of a dictionary.

Note: Errors may appear if the filepath is specified incorrectly upon initialization. Learn more under the Errors section of the documentation.

Load a certain Key on JSON

Jsconv has the ability to load a certain value given a desired key in the JSON.

const specific_data = jsconv_test.loadjs('KEY')

If the key is not found, an error will be prompted. Moreover, if the key has an empty data value, jsconv will return an undefined or null.

Errors

The most common error that can occur is a native JSON error where the filepath cannot be found in the form of:

SyntaxError: Unexpected end of JSON input

In this case, it is essential that the user has the filepath specified in the string format and is correct in terms of location. A common mistake users have is that they do not place, ./ before the parent directory to indicate that the location is within our present directory location on the Operating System.

Other errors that revolve JSON files are mostly related to its location. It is absolutely essential that the filepath is correct as all functions part of jsconv require a filepath reference.

Resources (Coming Soon)

Contact Information

Here are some of the ways you can find me:

Made by @Jaival - 2022