{"_id":"ast-pretty-print","_rev":"3950569","name":"ast-pretty-print","description":"A pretty printer for AST-like structures","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2025-09-01T01:37:06.000Z","created":"2017-05-15T05:15:18.578Z","2.0.1":"2017-09-08T08:42:19.299Z","2.0.0":"2017-06-08T21:18:09.973Z","1.3.0":"2017-06-02T00:20:37.762Z","1.2.1":"2017-05-29T23:40:24.122Z","1.2.0":"2017-05-27T01:55:41.315Z","1.1.5":"2017-05-16T06:19:23.322Z","1.1.4":"2017-05-15T06:50:50.064Z","1.1.3":"2017-05-15T06:12:07.537Z","1.1.2":"2017-05-15T06:01:51.391Z","1.1.1":"2017-05-15T05:57:07.686Z","1.1.0":"2017-05-15T05:52:25.977Z","1.0.0":"2017-05-15T05:15:18.578Z"},"users":{},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"versions":{"2.0.1":{"name":"ast-pretty-print","version":"2.0.1","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"pretty-format-ast":"^1.0.1","pretty-format2":"^2.0.3"},"gitHead":"257b86d7d1c8c3a8eb3c5aa64deee59f24f23aef","_id":"ast-pretty-print@2.0.1","scripts":{},"_shasum":"e3a0f443b8f9414d7925dea18d125362e4f6a372","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"e3a0f443b8f9414d7925dea18d125362e4f6a372","size":2184,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-2.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-pretty-print-2.0.1.tgz_1504860139173_0.7442261013202369"},"directories":{},"publish_time":1504860139299,"_hasShrinkwrap":false,"_cnpm_publish_time":1504860139299,"_cnpmcore_publish_time":"2021-12-16T18:38:36.233Z"},"2.0.0":{"name":"ast-pretty-print","version":"2.0.0","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"pretty-format":"^20.0.3","pretty-format-ast":"^1.0.0"},"gitHead":"740e579a80cca22e442014d2d21d4a3b20bbe40f","_id":"ast-pretty-print@2.0.0","scripts":{},"_shasum":"bd9da89d6fa5f035dd03e378a8b9cf3a6eae61d6","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"bd9da89d6fa5f035dd03e378a8b9cf3a6eae61d6","size":2132,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-2.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-pretty-print-2.0.0.tgz_1496956689865_0.1087549349758774"},"directories":{},"publish_time":1496956689973,"_hasShrinkwrap":false,"_cnpm_publish_time":1496956689973,"_cnpmcore_publish_time":"2021-12-16T18:38:36.736Z"},"1.3.0":{"name":"ast-pretty-print","version":"1.3.0","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"286ac73854d4fd3d7efd3f5e931ca75d85a934af","_id":"ast-pretty-print@1.3.0","scripts":{},"_shasum":"6654e50ee3de665c541fcf038ddbae5097ce8c43","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"6654e50ee3de665c541fcf038ddbae5097ce8c43","size":3457,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.3.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-pretty-print-1.3.0.tgz_1496362837666_0.9761495240963995"},"directories":{},"publish_time":1496362837762,"_hasShrinkwrap":false,"_cnpm_publish_time":1496362837762,"_cnpmcore_publish_time":"2021-12-16T18:38:36.996Z"},"1.2.1":{"name":"ast-pretty-print","version":"1.2.1","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"824337a2ce40bb3f3912e38e61e435c16fc17142","_id":"ast-pretty-print@1.2.1","scripts":{},"_shasum":"22c3ff891c9f49580e66bb178c7d68a5c030abda","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"22c3ff891c9f49580e66bb178c7d68a5c030abda","size":3432,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.2.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-pretty-print-1.2.1.tgz_1496101224058_0.24842428974807262"},"directories":{},"publish_time":1496101224122,"_hasShrinkwrap":false,"_cnpm_publish_time":1496101224122,"_cnpmcore_publish_time":"2021-12-16T18:38:37.199Z"},"1.2.0":{"name":"ast-pretty-print","version":"1.2.0","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"e0abd1f0a57d7a0061f661aae047ab1248b431bb","_id":"ast-pretty-print@1.2.0","scripts":{},"_shasum":"e52915ff33091db2e254a23058e503c79791aadd","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"e52915ff33091db2e254a23058e503c79791aadd","size":4710,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.2.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-pretty-print-1.2.0.tgz_1495850141178_0.7239135096315295"},"directories":{},"publish_time":1495850141315,"_hasShrinkwrap":false,"_cnpm_publish_time":1495850141315,"_cnpmcore_publish_time":"2021-12-16T18:38:37.429Z"},"1.1.5":{"name":"ast-pretty-print","version":"1.1.5","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"c9ce08151c30aeff921e185cc12b380dea7c920e","_id":"ast-pretty-print@1.1.5","scripts":{},"_shasum":"23a1c8ff96fad9f597a9b3e59acbf42eb2ff0a19","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"23a1c8ff96fad9f597a9b3e59acbf42eb2ff0a19","size":4629,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.5.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.5.tgz_1494915563074_0.03925130655989051"},"directories":{},"publish_time":1494915563322,"_hasShrinkwrap":false,"_cnpm_publish_time":1494915563322,"_cnpmcore_publish_time":"2021-12-16T18:38:37.638Z"},"1.1.4":{"name":"ast-pretty-print","version":"1.1.4","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"c6b0763e604423f286041f72483d5601342b5dbf","_id":"ast-pretty-print@1.1.4","scripts":{},"_shasum":"221d6ba03f7c88d470701138285435370fb5821f","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"221d6ba03f7c88d470701138285435370fb5821f","size":4625,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.4.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.4.tgz_1494831049779_0.28051599743776023"},"directories":{},"publish_time":1494831050064,"_hasShrinkwrap":false,"_cnpm_publish_time":1494831050064,"_cnpmcore_publish_time":"2021-12-16T18:38:37.844Z"},"1.1.3":{"name":"ast-pretty-print","version":"1.1.3","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"c9a5a101d626ca09b9db2bfac6dab43ffcb69324","_id":"ast-pretty-print@1.1.3","scripts":{},"_shasum":"109e3621af0da8df012e96b37eb0380c35089d90","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"109e3621af0da8df012e96b37eb0380c35089d90","size":4571,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.3.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.3.tgz_1494828727301_0.8046212326735258"},"directories":{},"publish_time":1494828727537,"_hasShrinkwrap":false,"_cnpm_publish_time":1494828727537,"_cnpmcore_publish_time":"2021-12-16T18:38:38.064Z"},"1.1.2":{"name":"ast-pretty-print","version":"1.1.2","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"c1809c1984cf0e84da79e9fde3454019b1534094","_id":"ast-pretty-print@1.1.2","scripts":{},"_shasum":"1bd58e965ae7b254b99ad94c2d4fb6a472323b29","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"1bd58e965ae7b254b99ad94c2d4fb6a472323b29","size":4606,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.2.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.2.tgz_1494828111151_0.616321882000193"},"directories":{},"publish_time":1494828111391,"_hasShrinkwrap":false,"_cnpm_publish_time":1494828111391,"_cnpmcore_publish_time":"2021-12-16T18:38:38.270Z"},"1.1.1":{"name":"ast-pretty-print","version":"1.1.1","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"611e113f560e3cd03b01faf917cd23236dee7443","_id":"ast-pretty-print@1.1.1","scripts":{},"_shasum":"1037d1a4e27ab4a751d3a162ea5d4fb8ccf87011","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"1037d1a4e27ab4a751d3a162ea5d4fb8ccf87011","size":4566,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.1.tgz_1494827827444_0.2980508126784116"},"directories":{},"publish_time":1494827827686,"_hasShrinkwrap":false,"_cnpm_publish_time":1494827827686,"_cnpmcore_publish_time":"2021-12-16T18:38:38.472Z"},"1.1.0":{"name":"ast-pretty-print","version":"1.1.0","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"dependencies":{"ansi-styles":"^3.0.0"},"gitHead":"97417fe822a5a5d67f03d95ce982aab5f535d196","_id":"ast-pretty-print@1.1.0","scripts":{},"_shasum":"dc077b9bdbea8482ef9cfcf7a2bad01379563206","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"dc077b9bdbea8482ef9cfcf7a2bad01379563206","size":4515,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.1.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.1.0.tgz_1494827545751_0.3901710081845522"},"directories":{},"publish_time":1494827545977,"_hasShrinkwrap":false,"_cnpm_publish_time":1494827545977,"_cnpmcore_publish_time":"2021-12-16T18:38:38.800Z"},"1.0.0":{"name":"ast-pretty-print","version":"1.0.0","description":"A pretty printer for AST-like structures","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"49ee912bba4e7a922bc746ca7c9adf396a9b7c7c","_id":"ast-pretty-print@1.0.0","scripts":{},"_shasum":"f99d758cc9ec129b9b3f34591755bca25107b417","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"f99d758cc9ec129b9b3f34591755bca25107b417","size":3271,"noattachment":false,"key":"/ast-pretty-print/-/ast-pretty-print-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ast-pretty-print/download/ast-pretty-print-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ast-pretty-print-1.0.0.tgz_1494825318326_0.28722022962756455"},"directories":{},"publish_time":1494825318578,"_hasShrinkwrap":false,"_cnpm_publish_time":1494825318578,"_cnpmcore_publish_time":"2021-12-16T18:38:39.017Z"}},"readme":"# ast-pretty-print\n\n> A pretty printer for AST-like structures\n\n- Super fast (useful for build tools)\n- Concise output (useful for debugging)\n- Consistent output (useful for snapshot testing)\n\n```js\nimport parser from 'parser';\nimport printAST from 'ast-pretty-print';\n\nlet code = `...`;\nlet ast = parser.parse(code);\nlet printed = printAST(ast);\n\nconsole.log(printed);\n```\n\n```js\nNode \"FunctionDeclaration\"\n  __clone: [Function __clone]\n  async: false\n  body: Node \"BlockStatement\" (1:29, 1:31)\n    body: Array []\n    directives: Array []\n  expression: false\n  generator: false\n  id: Node \"Identifier\" (1:9, 1:10)\n    name: \"a\"\n  params: Array [\n    Node \"Identifier\" (1:11, 1:18)\n      name: \"b\"\n      typeAnnotation: Node \"TypeAnnotation\" (1:12, 1:18)\n          typeAnnotation: Node \"StringLiteralTypeAnnotation\" (1:14, 1:18)\n              extra: Object {\n                  \"raw\": \"\\\"hi\\\"\",\n                  \"rawValue\": \"hi\",\n                }\n             value: \"hi\",\n    Node \"Identifier\" (1:20, 1:21)\n      name: \"c\",\n    Node \"RestElement\" (1:23, 1:27)\n      argument: Node \"Identifier\" (1:26, 1:27)\n        name: \"d\",\n  ]\n```\n","_attachments":{},"license":"MIT"}