Edits history of script submission #103 for ' Pretty Print JSON (helper)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    export async function main(value: object | string, indentation = 2) {
      if (typeof value === "string") {
        value = JSON.parse(value);
      }
      return JSON.stringify(value, null, indentation);
    }
    

    Submitted by hugo697 375 days ago

  • deno
    export async function main(value: object | string, indentation = 2) {
      if (typeof value === "string") {
        value = JSON.parse(value);
      }
      return JSON.stringify(value, null, indentation);
    }
    

    Submitted by admin 1008 days ago

  • deno
    export async function main(value: object|string, indentation = 2) {
        if (typeof value === 'string') {
            value = JSON.parse(value);
        }
        return JSON.stringify(value, null, indentation);
    }
    

    Submitted by jaller94 1375 days ago