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

  • 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 hugo697 419 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 1051 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 1418 days ago