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

tucson

v0.3.5

Published

Convert JSON key/values to make it fit on your project

Readme

Build Status

TUCSON - TUne/Convert Your jSON

Tucson (/ˈtuːsɒn, tuːˈsɒn/) is a package to convert JSON key/values to make it fit on your project.

Motivation

We usually want to keep unified code format, such as naming rule, spacing, etc. in project. But when code convention between client side(front-end) and server side(back-end) are different, this would cause some exception on it.

For example, I developed client side with javascript and server side with python. But python usually uses snake_case for parameter name, while javascirpt has been developed, in my case, with camelCase. In this situation, some of the javascript needs to be using snake_case, to receive and handle parameters from server.

So this is why I thought about this. By wrapping response data with this and setup option fit to convention in client side, I could keep codes in unified form.

Thanks for reviewers

Usage

This is still in beta status, so API format/name could be changed by version updates.

Installation

// NPM
$ npm install tucson

// YARN
$ yarn add tucson

Example

let { Tucson, Config } = require('tucson')

const dummyUnderscoreJson = {
  "group_id": 139,
  "user": "[email protected]",
  "phone_number": "000-111-2222",
  "salary": "Unknown",
  "is_valid": 0,
  "date": "2014-06-01 12:00"
}

let formedResult = {}
let cctucson = new Tucson(new Config('camelCase'))
cctucson.formed(dummyUnderscoreJson, {
  makeDate: ['date'],
  makeBool: ['is_valid']
}, formedResult)
console.log(formedResult)

...result is...

{
    "groupId":139,
    "user":"[email protected]",
    "phoneNumber":"000-111-2222",
    "salary":"Unknown",
    "isValid": false,
    "date":"2014-06-01T03:00:00.000Z"
}

Options


Config

It has single parameter(will be updated more...)

Key Name | Type | Available Value | Description --- | --- | --- | --- KeyConvertType (optional) | string | 'camelCase', 'snake_case' | Converting key data to defined type

Tucson::formed

Definition of formed is:

Tucson.formed(original-object, option, reformed-object)

Second parameter is JSON format option to select converting rule. More options will be updated.

Key Name | Type | Description --- | --- | --- exclude | string[key of original json] | Exclude selected keys in reformed object makeDate | string[key of original json] | Make value of selected keys as format of Moment.Date makeBool | string[key of original json] | Make value of selected keys as boolean.

Contribution

Any type of contribution/feedback(Issue, PR, or Star) is Welcome! Feel free to join.