Feature: Additions to CommonJS PR 

Continuation of PR #1300 
Better to `json.dumps` this value rather than use `if-else` logic.