{"_id":"pug-walk","_rev":"85068","name":"pug-walk","description":"Walk and transform a pug AST","dist-tags":{"canary":"2.0.0-canary-2","latest":"2.0.0"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"time":{"modified":"2021-06-03T10:27:31.000Z","created":"2015-12-12T00:28:05.587Z","2.0.0":"2020-05-25T12:19:37.600Z","2.0.0-canary-2":"2020-05-25T12:19:03.756Z","2.0.0-canary-1":"2020-05-24T23:08:04.275Z","1.1.8":"2019-06-18T09:44:55.330Z","1.1.7":"2018-03-08T16:32:31.549Z","1.1.6":"2018-03-06T13:12:29.964Z","1.1.5":"2017-09-06T15:28:13.321Z","1.1.4":"2017-08-01T15:53:49.062Z","1.1.3":"2017-06-02T12:33:34.720Z","1.1.2":"2017-04-18T00:36:31.196Z","1.1.1":"2017-02-04T12:40:38.170Z","1.1.0":"2017-01-24T01:07:30.408Z","1.0.0":"2016-08-23T00:45:42.415Z","0.0.4":"2016-08-17T01:38:56.300Z","0.0.3":"2015-12-23T04:00:23.616Z","0.0.0":"2015-12-12T00:28:05.587Z"},"users":{},"author":{"name":"ForbesLindesay"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-walk"},"versions":{"2.0.0":{"name":"pug-walk","version":"2.0.0","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"^5.0.0","pug-parser":"^6.0.0"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-walk"},"author":{"name":"ForbesLindesay"},"license":"MIT","_id":"pug-walk@2.0.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"417aabc29232bb4499b5b5069a2b2d2a24d5f5fe","size":3643,"noattachment":false,"key":"/pug-walk/-/pug-walk-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-2.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_2.0.0_1590409177391_0.07021523916450123"},"_hasShrinkwrap":false,"publish_time":1590409177600,"_cnpm_publish_time":1590409177600},"2.0.0-canary-2":{"name":"pug-walk","version":"2.0.0-canary-2","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"5.0.0-canary-2","pug-parser":"6.0.0-canary-2"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-walk"},"author":{"name":"ForbesLindesay"},"license":"MIT","readmeFilename":"README.md","_id":"pug-walk@2.0.0-canary-2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"1ee2db5c6600d3a6784157e2816eaaad7955fdba","size":3651,"noattachment":false,"key":"/pug-walk/-/pug-walk-2.0.0-canary-2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-2.0.0-canary-2.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_2.0.0-canary-2_1590409143600_0.7596833827291898"},"_hasShrinkwrap":false,"publish_time":1590409143756,"_cnpm_publish_time":1590409143756},"2.0.0-canary-1":{"name":"pug-walk","version":"2.0.0-canary-1","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"5.0.0-canary-1","pug-parser":"6.0.0-canary-1"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-walk"},"author":{"name":"ForbesLindesay"},"license":"MIT","readmeFilename":"README.md","_id":"pug-walk@2.0.0-canary-1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"229312560f02f16c6d36bf6feea2094403dc2cfb","size":3651,"noattachment":false,"key":"/pug-walk/-/pug-walk-2.0.0-canary-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-2.0.0-canary-1.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_2.0.0-canary-1_1590361684139_0.9234803325096856"},"_hasShrinkwrap":false,"publish_time":1590361684275,"_cnpm_publish_time":1590361684275},"1.1.8":{"name":"pug-walk","version":"1.1.8","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"^4.1.0","pug-parser":"^5.0.1"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-walk"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"1bdf628a70fda7a0d840c52f3abce54b1c6b0130","_id":"pug-walk@1.1.8","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.10.8/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"b408f67f27912f8c21da2f45b7230c4bd2a5ea7a","size":3680,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.8.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_1.1.8_1560851095185_0.7468465206388961"},"_hasShrinkwrap":false,"publish_time":1560851095330,"_cnpm_publish_time":1560851095330},"1.1.7":{"name":"pug-walk","version":"1.1.7","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"^4.0.0","pug-parser":"^5.0.0"},"files":["index.js"],"repository":{"type":"git","url":"https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","licenseText":"Copyright (c) 2015 Forbes Lindesay\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","_id":"pug-walk@1.1.7","dist":{"shasum":"c00d5c5128bac5806bec15d2b7e7cdabe42531f3","size":3591,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.7.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_1.1.7_1520526751485_0.09264111446123025"},"_hasShrinkwrap":false,"publish_time":1520526751549,"_cnpm_publish_time":1520526751549},"1.1.6":{"name":"pug-walk","version":"1.1.6","description":"Walk and transform a pug AST","keywords":["pug"],"devDependencies":{"pug-lexer":"^4.0.0","pug-parser":"^4.0.1"},"files":["index.js"],"repository":{"type":"git","url":"https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","licenseText":"Copyright (c) 2015 Forbes Lindesay\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","_id":"pug-walk@1.1.6","dist":{"shasum":"7cabcd737cdbfaecfb0f32af7127ebacf423947a","size":3588,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.6.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk_1.1.6_1520341949922_0.3182537225300499"},"_hasShrinkwrap":false,"publish_time":1520341949964,"_cnpm_publish_time":1520341949964},"1.1.5":{"name":"pug-walk","version":"1.1.5","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^3.1.0","pug-parser":"^4.0.0"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"90e943acbcf7021e6454cf1b32245891cba6f851","size":3565,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.5.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk-1.1.5.tgz_1504711692377_0.9965778533369303"},"directories":{},"publish_time":1504711693321,"_cnpm_publish_time":1504711693321,"_hasShrinkwrap":false},"1.1.4":{"name":"pug-walk","version":"1.1.4","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^3.1.0","pug-parser":"^3.0.1"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.4","_npmVersion":"5.3.0","_nodeVersion":"8.0.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"29e5174af43b67e99c31b448632e1ff86ddd671c","size":3565,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.4.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk-1.1.4.tgz_1501602828147_0.046882804948836565"},"directories":{},"publish_time":1501602829062,"_cnpm_publish_time":1501602829062,"_hasShrinkwrap":false},"1.1.3":{"name":"pug-walk","version":"1.1.3","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^3.1.0","pug-parser":"^3.0.0"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.3","scripts":{},"_shasum":"d7cd5b23db3ca87c636c86a0973f9cd8e030436c","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"d7cd5b23db3ca87c636c86a0973f9cd8e030436c","size":3568,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.3.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-walk-1.1.3.tgz_1496406813833_0.6926728847902268"},"directories":{},"publish_time":1496406814720,"_cnpm_publish_time":1496406814720,"_hasShrinkwrap":false},"1.1.2":{"name":"pug-walk","version":"1.1.2","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^3.1.0","pug-parser":"^2.0.2"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.2","scripts":{},"_shasum":"debb24c070a95d5fc2aebf3589261833d2332e3b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"debb24c070a95d5fc2aebf3589261833d2332e3b","size":3566,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-walk-1.1.2.tgz_1492475789327_0.5944479894824326"},"directories":{},"publish_time":1492475791196,"_cnpm_publish_time":1492475791196,"_hasShrinkwrap":false},"1.1.1":{"name":"pug-walk","version":"1.1.1","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^3.0.0","pug-parser":"^2.0.2"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.1","scripts":{},"_shasum":"b9976240d213692e6993fbc13ae1205c54052efe","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"b9976240d213692e6993fbc13ae1205c54052efe","size":3565,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-walk-1.1.1.tgz_1486212036397_0.6612019978929311"},"directories":{},"publish_time":1486212038170,"_cnpm_publish_time":1486212038170,"_hasShrinkwrap":false},"1.1.0":{"name":"pug-walk","version":"1.1.0","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^2.3.1","pug-parser":"^2.0.2"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.1.0","scripts":{},"_shasum":"f784cf94215d70ade49f1fc05c736dc741623051","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"f784cf94215d70ade49f1fc05c736dc741623051","size":3557,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/pug-walk-1.1.0.tgz_1485220049711_0.131509616272524"},"directories":{},"publish_time":1485220050408,"_cnpm_publish_time":1485220050408,"_hasShrinkwrap":false},"1.0.0":{"name":"pug-walk","version":"1.0.0","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"istanbul":"*","pug-lexer":"^2.1.0","pug-parser":"^2.0.1","testit":"^2.1.2"},"scripts":{"test":"node test","coverage":"istanbul cover test"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"eb1c80bd7d8cb83e62fd927a0f8bca293a605c35","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@1.0.0","_shasum":"7f4ae1456a4f18feee40a0d708b75c1c51d2e4e4","_from":".","_npmVersion":"3.10.7","_nodeVersion":"6.3.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"7f4ae1456a4f18feee40a0d708b75c1c51d2e4e4","size":3454,"noattachment":false,"key":"/pug-walk/-/pug-walk-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-1.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-walk-1.0.0.tgz_1471913142178_0.11957901529967785"},"directories":{},"publish_time":1471913142415,"_cnpm_publish_time":1471913142415,"_hasShrinkwrap":false},"0.0.4":{"name":"pug-walk","version":"0.0.4","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"istanbul":"*","pug-lexer":"^1.0.0","pug-parser":"^1.0.0"},"scripts":{"test":"node test","coverage":"istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"568272940de7736dededd77415e9afea5117d41b","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk#readme","_id":"pug-walk@0.0.4","_shasum":"dbacda02d1a3b9d979468984cadcf4d4d19a0e23","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"dbacda02d1a3b9d979468984cadcf4d4d19a0e23","size":17958,"noattachment":false,"key":"/pug-walk/-/pug-walk-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-0.0.4.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/pug-walk-0.0.4.tgz_1471397932459_0.4809441489633173"},"directories":{},"publish_time":1471397936300,"_cnpm_publish_time":1471397936300,"_hasShrinkwrap":false},"0.0.3":{"name":"pug-walk","version":"0.0.3","description":"Walk and transform a pug AST","keywords":["pug"],"dependencies":{},"devDependencies":{"pug-lexer":"^1.0.0","pug-parser":"^1.0.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/pugjs/pug-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"713aa9906fcf8025457fca927446f4dee95386a6","bugs":{"url":"https://github.com/pugjs/pug-walk/issues"},"homepage":"https://github.com/pugjs/pug-walk","_id":"pug-walk@0.0.3","_shasum":"c28be7bcc540f24b83d274472410827c84e31ac6","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"c28be7bcc540f24b83d274472410827c84e31ac6","size":3107,"noattachment":false,"key":"/pug-walk/-/pug-walk-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-0.0.3.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"directories":{},"publish_time":1450843223616,"_cnpm_publish_time":1450843223616,"_hasShrinkwrap":false},"0.0.0":{"name":"pug-walk","version":"0.0.0","description":"Walk and transform a jade AST","keywords":["jade"],"dependencies":{},"devDependencies":{"pug-lexer":"^0.0.0","pug-parser":"^0.0.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"https://github.com/jadejs/jade-walk.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"70758dfd7da3727ef51a17e0852d30b8fe1d4bb2","bugs":{"url":"https://github.com/jadejs/jade-walk/issues"},"homepage":"https://github.com/jadejs/jade-walk","_id":"pug-walk@0.0.0","_shasum":"d16ed9429e6ae71698fedeeaee4734ea81ecd52a","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"d16ed9429e6ae71698fedeeaee4734ea81ecd52a","size":3108,"noattachment":false,"key":"/pug-walk/-/pug-walk-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-walk/download/pug-walk-0.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"directories":{},"publish_time":1449880085587,"_cnpm_publish_time":1449880085587,"_hasShrinkwrap":false}},"readme":"# pug-walk\n\nWalk and transform a Pug AST\n\n[![Build Status](https://img.shields.io/travis/pugjs/pug-walk/master.svg)](https://travis-ci.org/pugjs/pug-walk)\n[![Dependencies Status](https://david-dm.org/pugjs/pug/status.svg?path=packages/pug-walk)](https://david-dm.org/pugjs/pug?path=packages/pug-walk)\n[![DevDependencies Status](https://david-dm.org/pugjs/pug/dev-status.svg?path=packages/pug-walk)](https://david-dm.org/pugjs/pug?path=packages/pug-walk&type=dev)\n[![npm version](https://img.shields.io/npm/v/pug-walk.svg)](https://www.npmjs.org/package/pug-walk)\n[![Coverage Status](https://img.shields.io/codecov/c/github/pugjs/pug-walk/master.svg)](https://codecov.io/gh/pugjs/pug-walk/branch/master)\n\n## Installation\n\n    npm install pug-walk\n\n## Usage\n\n```js\nvar walk = require('pug-walk');\n```\n\n### `walk(ast, before, after, options)`\n\nTraverse and optionally transform a [Pug AST](https://github.com/pugjs/pug-ast-spec).\n\n`ast` is not cloned, so any changes done to it will be done directly on the AST provided.\n\n`before` and `after` are functions with the signature `(node, replace)`. `before` is called when a node is first seen, while `after` is called after the children of the node (if any) have already been traversed.\n\nThe `replace` parameter is a function that can be used to replace the node in the AST. It takes either an object or an array as its only parameter. If an object is specified, the current node is replaced by the parameter in the AST. If an array is specified and the ancestor of the current node allows such an operation, the node is replaced by all of the nodes in the specified array. This way, you can remove and add new nodes adjacent to the current node. Whether the parent node allows array operation is indicated by the property `replace.arrayAllowed`, which is set to true when the parent is a Block and when the parent is a Include and the node is an IncludeFilter.\n\nIf `before` returns `false`, the children of this node will not be traversed and left unchanged (unless `replace` has been called). Otherwise, the returned value of `before` is ignored. The returned value of `after` is always ignored. If `replace()` is called in `before()` with an array, and `before()` does not return `false`, the nodes in the array are still descended.\n\n`options` can contain the following properties:\n\n* `includeDependencies` (boolean): Walk the AST of a loaded dependent file (i.e., includes and extends). Defaults to `false`.\n* `parents` (array<Node>): Nodes that are ancestors to the current `ast`. This option is used mainly internally, and users usually do not have to specify it. Defaults to `[]`.\n\n```js\nvar lex = require('pug-lexer');\nvar parse = require('pug-parser');\n\n// Changing content of all Text nodes\n// ==================================\n\nvar source = '.my-class foo';\nvar dest = '.my-class bar';\n\nvar ast = parse(lex(source));\n\nast = walk(ast, function before(node, replace) {\n  if (node.type === 'Text') {\n    node.val = 'bar';\n\n    // Alternatively, you can replace the entire node\n    // rather than just the text.\n    // replace({ type: 'Text', val: 'bar', line: node.line });\n  }\n}, {\n  includeDependencies: true\n});\n\nassert.deepEqual(parse(lex(dest)), ast);\n\n// Convert all simple <strong> elements to text\n// ============================================\n\nvar source = 'p abc #[strong NO]\\nstrong on its own line';\nvar dest = 'p abc #[| NO]\\n| on its own line';\n\nvar ast = parse(lex(source));\n\nast = walk(ast, function before(node, replace) {\n  // Find all <strong> tags\n  if (node.type === 'Tag' && node.name === 'strong') {\n    var children = node.block.nodes;\n\n    // Make sure that the Tag only has one child -- the text\n    if (children.length === 1 && children[0].type === 'Text') {\n      // Replace the Tag with the Text\n      replace({ type: 'Text', val: children[0].val, line: node.line });\n    }\n  }\n}, {\n  includeDependencies: true\n});\n\nassert.deepEqual(parse(lex(dest)), ast);\n\n// Flatten blocks\n// ==============\n\nvar ast = {\n  type: 'Block',\n  nodes: [\n    { type: 'Text', val: 'a' },\n    {\n      type: 'Block',\n      nodes: [\n        { type: 'Text', val: 'b' },\n        {\n          type: 'Block',\n          nodes: [ { type: 'Text', val: 'c' } ]\n        },\n        { type: 'Text', val: 'd' }\n      ]\n    },\n    { type: 'Text', val: 'e' }\n  ]\n};\n\nvar dest = {\n  type: 'Block',\n  nodes: [\n    { type: 'Text', val: 'a' },\n    { type: 'Text', val: 'b' },\n    { type: 'Text', val: 'c' },\n    { type: 'Text', val: 'd' },\n    { type: 'Text', val: 'e' }\n  ]\n};\n\n// We need to use `after` handler instead of `before`\n// handler because we want to flatten the innermost\n// blocks first before proceeding onto outer blocks.\n\nast = walk(ast, null, function after(node, replace) {\n  if (node.type === 'Block' && replace.arrayAllowed) {\n    // Replace the block with its contents\n    replace(node.nodes);\n  }\n});\n\nassert.deepEqual(dest, ast);\n```\n\n## License\n\n  MIT\n","_attachments":{},"license":"MIT"}