Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
{"/Users/popomore/code/popomore/rename/index.js":{"path":"/Users/popomore/code/popomore/rename/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":22,"10":22,"11":22,"12":3,"13":3,"14":3,"15":19,"16":5,"17":14,"18":14,"19":1,"20":14,"21":14,"22":14,"23":14,"24":14,"25":14,"26":1,"27":42,"28":1,"29":14,"30":38,"31":3,"32":35,"33":3},"b":{"1":[6,16],"2":[3,19],"3":[3,2],"4":[5,14],"5":[14,8],"6":[14,2],"7":[20,22],"8":[20,3],"9":[3,35],"10":[3,1]},"f":{"1":22,"2":14,"3":42,"4":14,"5":38,"6":3},"fnMap":{"1":{"name":"rename","line":15,"loc":{"start":{"line":15,"column":0},"end":{"line":15,"column":39}}},"2":{"name":"transform","line":56,"loc":{"start":{"line":56,"column":0},"end":{"line":56,"column":41}}},"3":{"name":"choose","line":69,"loc":{"start":{"line":69,"column":0},"end":{"line":69,"column":39}}},"4":{"name":"parseTemplate","line":74,"loc":{"start":{"line":74,"column":0},"end":{"line":74,"column":45}}},"5":{"name":"(anonymous_5)","line":75,"loc":{"start":{"line":75,"column":35},"end":{"line":75,"column":49}}},"6":{"name":"(anonymous_6)","line":77,"loc":{"start":{"line":77,"column":77},"end":{"line":77,"column":98}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":39}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":35}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":43}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":33}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":24}},"6":{"start":{"line":9,"column":0},"end":{"line":9,"column":29}},"7":{"start":{"line":10,"column":0},"end":{"line":10,"column":37}},"8":{"start":{"line":15,"column":0},"end":{"line":54,"column":1}},"9":{"start":{"line":26,"column":2},"end":{"line":26,"column":32}},"10":{"start":{"line":39,"column":2},"end":{"line":39,"column":86}},"11":{"start":{"line":42,"column":2},"end":{"line":46,"column":3}},"12":{"start":{"line":43,"column":4},"end":{"line":43,"column":51}},"13":{"start":{"line":44,"column":4},"end":{"line":44,"column":59}},"14":{"start":{"line":45,"column":4},"end":{"line":45,"column":18}},"15":{"start":{"line":48,"column":2},"end":{"line":50,"column":3}},"16":{"start":{"line":49,"column":4},"end":{"line":49,"column":73}},"17":{"start":{"line":52,"column":2},"end":{"line":52,"column":57}},"18":{"start":{"line":53,"column":2},"end":{"line":53,"column":41}},"19":{"start":{"line":56,"column":0},"end":{"line":67,"column":1}},"20":{"start":{"line":57,"column":2},"end":{"line":57,"column":38}},"21":{"start":{"line":58,"column":2},"end":{"line":58,"column":18}},"22":{"start":{"line":59,"column":2},"end":{"line":59,"column":59}},"23":{"start":{"line":60,"column":2},"end":{"line":60,"column":59}},"24":{"start":{"line":61,"column":2},"end":{"line":65,"column":13}},"25":{"start":{"line":66,"column":2},"end":{"line":66,"column":27}},"26":{"start":{"line":69,"column":0},"end":{"line":71,"column":1}},"27":{"start":{"line":70,"column":2},"end":{"line":70,"column":64}},"28":{"start":{"line":74,"column":0},"end":{"line":81,"column":1}},"29":{"start":{"line":75,"column":2},"end":{"line":80,"column":5}},"30":{"start":{"line":76,"column":4},"end":{"line":76,"column":36}},"31":{"start":{"line":76,"column":28},"end":{"line":76,"column":35}},"32":{"start":{"line":77,"column":4},"end":{"line":79,"column":7}},"33":{"start":{"line":78,"column":6},"end":{"line":78,"column":36}}},"branchMap":{"1":{"line":39,"type":"cond-expr","locations":[{"start":{"line":39,"column":51},"end":{"line":39,"column":71}},{"start":{"line":39,"column":74},"end":{"line":39,"column":85}}]},"2":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":2},"end":{"line":42,"column":2}},{"start":{"line":42,"column":2},"end":{"line":42,"column":2}}]},"3":{"line":43,"type":"binary-expr","locations":[{"start":{"line":43,"column":17},"end":{"line":43,"column":28}},{"start":{"line":43,"column":32},"end":{"line":43,"column":50}}]},"4":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":2},"end":{"line":48,"column":2}},{"start":{"line":48,"column":2},"end":{"line":48,"column":2}}]},"5":{"line":62,"type":"binary-expr","locations":[{"start":{"line":62,"column":4},"end":{"line":62,"column":22}},{"start":{"line":62,"column":26},"end":{"line":62,"column":28}}]},"6":{"line":64,"type":"binary-expr","locations":[{"start":{"line":64,"column":4},"end":{"line":64,"column":22}},{"start":{"line":64,"column":26},"end":{"line":64,"column":28}}]},"7":{"line":70,"type":"cond-expr","locations":[{"start":{"line":70,"column":28},"end":{"line":70,"column":47}},{"start":{"line":70,"column":51},"end":{"line":70,"column":63}}]},"8":{"line":70,"type":"binary-expr","locations":[{"start":{"line":70,"column":28},"end":{"line":70,"column":41}},{"start":{"line":70,"column":45},"end":{"line":70,"column":47}}]},"9":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":4},"end":{"line":76,"column":4}},{"start":{"line":76,"column":4},"end":{"line":76,"column":4}}]},"10":{"line":78,"type":"binary-expr","locations":[{"start":{"line":78,"column":13},"end":{"line":78,"column":29}},{"start":{"line":78,"column":33},"end":{"line":78,"column":35}}]}}},"/Users/popomore/code/popomore/rename/lib/parse.js":{"path":"/Users/popomore/code/popomore/rename/lib/parse.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":38,"9":33,"10":33,"11":24,"12":9,"13":9,"14":9,"15":9,"16":33,"17":33,"18":1,"19":24,"20":24},"b":{"1":[38,14],"2":[24,9],"3":[9,7],"4":[9,3],"5":[9,3],"6":[9,8]},"f":{"1":38,"2":24},"fnMap":{"1":{"name":"parse","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":38}}},"2":{"name":"toObject","line":29,"loc":{"start":{"line":29,"column":0},"end":{"line":29,"column":24}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":45}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":40}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":29}},"7":{"start":{"line":10,"column":0},"end":{"line":27,"column":2}},"8":{"start":{"line":11,"column":2},"end":{"line":12,"column":44}},"9":{"start":{"line":14,"column":2},"end":{"line":14,"column":18}},"10":{"start":{"line":16,"column":2},"end":{"line":23,"column":3}},"11":{"start":{"line":17,"column":4},"end":{"line":17,"column":26}},"12":{"start":{"line":19,"column":4},"end":{"line":19,"column":38}},"13":{"start":{"line":20,"column":4},"end":{"line":20,"column":38}},"14":{"start":{"line":21,"column":4},"end":{"line":21,"column":40}},"15":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"16":{"start":{"line":25,"column":2},"end":{"line":25,"column":43}},"17":{"start":{"line":26,"column":2},"end":{"line":26,"column":14}},"18":{"start":{"line":29,"column":0},"end":{"line":37,"column":1}},"19":{"start":{"line":30,"column":2},"end":{"line":30,"column":26}},"20":{"start":{"line":31,"column":2},"end":{"line":36,"column":4}}},"branchMap":{"1":{"line":11,"type":"binary-expr","locations":[{"start":{"line":11,"column":9},"end":{"line":11,"column":28}},{"start":{"line":11,"column":32},"end":{"line":11,"column":51}}]},"2":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":16,"column":2}},{"start":{"line":16,"column":2},"end":{"line":16,"column":2}}]},"3":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":19},"end":{"line":19,"column":31}},{"start":{"line":19,"column":35},"end":{"line":19,"column":37}}]},"4":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":19},"end":{"line":20,"column":31}},{"start":{"line":20,"column":35},"end":{"line":20,"column":37}}]},"5":{"line":21,"type":"binary-expr","locations":[{"start":{"line":21,"column":20},"end":{"line":21,"column":33}},{"start":{"line":21,"column":37},"end":{"line":21,"column":39}}]},"6":{"line":22,"type":"binary-expr","locations":[{"start":{"line":22,"column":18},"end":{"line":22,"column":29}},{"start":{"line":22,"column":33},"end":{"line":22,"column":35}}]}}},"/Users/popomore/code/popomore/rename/lib/util.js":{"path":"/Users/popomore/code/popomore/rename/lib/util.js","s":{"1":1,"2":1,"3":93,"4":1,"5":62,"6":1,"7":22},"b":{},"f":{"1":93,"2":62,"3":22},"fnMap":{"1":{"name":"isString","line":5,"loc":{"start":{"line":5,"column":19},"end":{"line":5,"column":42}}},"2":{"name":"isObject","line":9,"loc":{"start":{"line":9,"column":19},"end":{"line":9,"column":42}}},"3":{"name":"isFunction","line":13,"loc":{"start":{"line":13,"column":21},"end":{"line":13,"column":46}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":41}},"2":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":6,"column":2},"end":{"line":6,"column":50}},"4":{"start":{"line":9,"column":0},"end":{"line":11,"column":2}},"5":{"start":{"line":10,"column":2},"end":{"line":10,"column":50}},"6":{"start":{"line":13,"column":0},"end":{"line":15,"column":2}},"7":{"start":{"line":14,"column":2},"end":{"line":14,"column":52}}},"branchMap":{}},"/Users/popomore/code/popomore/rename/lib/stringify.js":{"path":"/Users/popomore/code/popomore/rename/lib/stringify.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":29,"7":23,"8":23,"9":23,"10":23,"11":23,"12":2,"13":23,"14":23},"b":{"1":[23,7],"2":[23,6],"3":[23,2],"4":[2,21]},"f":{"1":29},"fnMap":{"1":{"name":"stringify","line":8,"loc":{"start":{"line":8,"column":17},"end":{"line":8,"column":41}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":42}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":32}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":42}},"5":{"start":{"line":8,"column":0},"end":{"line":22,"column":2}},"6":{"start":{"line":9,"column":2},"end":{"line":9,"column":54}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":35}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":34}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":36}},"10":{"start":{"line":16,"column":2},"end":{"line":16,"column":59}},"11":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"12":{"start":{"line":18,"column":4},"end":{"line":18,"column":14}},"13":{"start":{"line":20,"column":2},"end":{"line":20,"column":33}},"14":{"start":{"line":21,"column":2},"end":{"line":21,"column":14}}},"branchMap":{"1":{"line":11,"type":"binary-expr","locations":[{"start":{"line":11,"column":16},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":34}}]},"2":{"line":12,"type":"binary-expr","locations":[{"start":{"line":12,"column":16},"end":{"line":12,"column":27}},{"start":{"line":12,"column":31},"end":{"line":12,"column":33}}]},"3":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":17},"end":{"line":13,"column":29}},{"start":{"line":13,"column":33},"end":{"line":13,"column":35}}]},"4":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":17,"column":2}},{"start":{"line":17,"column":2},"end":{"line":17,"column":2}}]}}}} | ||
{"/Users/popomore/code/popomore/rename/index.js":{"path":"/Users/popomore/code/popomore/rename/index.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":24,"10":24,"11":24,"12":24,"13":4,"14":4,"15":4,"16":20,"17":4,"18":16,"19":16,"20":16,"21":1,"22":16,"23":16,"24":16,"25":16,"26":16,"27":16,"28":1,"29":48,"30":1,"31":1,"32":16,"33":16,"34":40,"35":5,"36":16},"b":{"1":[6,18],"2":[4,20],"3":[4,2],"4":[4,16],"5":[16,10],"6":[16,2],"7":[20,28],"8":[20,3],"9":[3,37],"10":[5,1]},"f":{"1":24,"2":16,"3":48,"4":16,"5":40,"6":5},"fnMap":{"1":{"name":"rename","line":15,"loc":{"start":{"line":15,"column":0},"end":{"line":15,"column":39}}},"2":{"name":"transform","line":58,"loc":{"start":{"line":58,"column":0},"end":{"line":58,"column":41}}},"3":{"name":"choose","line":71,"loc":{"start":{"line":71,"column":0},"end":{"line":71,"column":39}}},"4":{"name":"parseTemplate","line":77,"loc":{"start":{"line":77,"column":0},"end":{"line":77,"column":45}}},"5":{"name":"(anonymous_5)","line":79,"loc":{"start":{"line":79,"column":35},"end":{"line":79,"column":49}}},"6":{"name":"(anonymous_6)","line":82,"loc":{"start":{"line":82,"column":43},"end":{"line":82,"column":64}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":39}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":35}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":43}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":33}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":24}},"6":{"start":{"line":9,"column":0},"end":{"line":9,"column":29}},"7":{"start":{"line":10,"column":0},"end":{"line":10,"column":37}},"8":{"start":{"line":15,"column":0},"end":{"line":56,"column":1}},"9":{"start":{"line":16,"column":2},"end":{"line":16,"column":13}},"10":{"start":{"line":27,"column":2},"end":{"line":27,"column":32}},"11":{"start":{"line":40,"column":2},"end":{"line":40,"column":86}},"12":{"start":{"line":43,"column":2},"end":{"line":47,"column":3}},"13":{"start":{"line":44,"column":4},"end":{"line":44,"column":47}},"14":{"start":{"line":45,"column":4},"end":{"line":45,"column":77}},"15":{"start":{"line":46,"column":4},"end":{"line":46,"column":18}},"16":{"start":{"line":49,"column":2},"end":{"line":51,"column":3}},"17":{"start":{"line":50,"column":4},"end":{"line":50,"column":73}},"18":{"start":{"line":53,"column":2},"end":{"line":53,"column":43}},"19":{"start":{"line":54,"column":2},"end":{"line":54,"column":75}},"20":{"start":{"line":55,"column":2},"end":{"line":55,"column":16}},"21":{"start":{"line":58,"column":0},"end":{"line":69,"column":1}},"22":{"start":{"line":59,"column":2},"end":{"line":59,"column":52}},"23":{"start":{"line":60,"column":2},"end":{"line":60,"column":18}},"24":{"start":{"line":61,"column":2},"end":{"line":61,"column":59}},"25":{"start":{"line":62,"column":2},"end":{"line":62,"column":59}},"26":{"start":{"line":63,"column":2},"end":{"line":67,"column":13}},"27":{"start":{"line":68,"column":2},"end":{"line":68,"column":27}},"28":{"start":{"line":71,"column":0},"end":{"line":73,"column":1}},"29":{"start":{"line":72,"column":2},"end":{"line":72,"column":64}},"30":{"start":{"line":76,"column":0},"end":{"line":76,"column":45}},"31":{"start":{"line":77,"column":0},"end":{"line":87,"column":1}},"32":{"start":{"line":78,"column":2},"end":{"line":78,"column":18}},"33":{"start":{"line":79,"column":2},"end":{"line":85,"column":5}},"34":{"start":{"line":80,"column":4},"end":{"line":84,"column":9}},"35":{"start":{"line":83,"column":8},"end":{"line":83,"column":38}},"36":{"start":{"line":86,"column":2},"end":{"line":86,"column":16}}},"branchMap":{"1":{"line":40,"type":"cond-expr","locations":[{"start":{"line":40,"column":51},"end":{"line":40,"column":71}},{"start":{"line":40,"column":74},"end":{"line":40,"column":85}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":2},"end":{"line":43,"column":2}},{"start":{"line":43,"column":2},"end":{"line":43,"column":2}}]},"3":{"line":44,"type":"binary-expr","locations":[{"start":{"line":44,"column":13},"end":{"line":44,"column":24}},{"start":{"line":44,"column":28},"end":{"line":44,"column":46}}]},"4":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":2},"end":{"line":49,"column":2}},{"start":{"line":49,"column":2},"end":{"line":49,"column":2}}]},"5":{"line":64,"type":"binary-expr","locations":[{"start":{"line":64,"column":4},"end":{"line":64,"column":22}},{"start":{"line":64,"column":26},"end":{"line":64,"column":28}}]},"6":{"line":66,"type":"binary-expr","locations":[{"start":{"line":66,"column":4},"end":{"line":66,"column":22}},{"start":{"line":66,"column":26},"end":{"line":66,"column":28}}]},"7":{"line":72,"type":"cond-expr","locations":[{"start":{"line":72,"column":28},"end":{"line":72,"column":47}},{"start":{"line":72,"column":51},"end":{"line":72,"column":63}}]},"8":{"line":72,"type":"binary-expr","locations":[{"start":{"line":72,"column":28},"end":{"line":72,"column":41}},{"start":{"line":72,"column":45},"end":{"line":72,"column":47}}]},"9":{"line":80,"type":"cond-expr","locations":[{"start":{"line":81,"column":6},"end":{"line":81,"column":22}},{"start":{"line":82,"column":6},"end":{"line":84,"column":8}}]},"10":{"line":83,"type":"binary-expr","locations":[{"start":{"line":83,"column":15},"end":{"line":83,"column":31}},{"start":{"line":83,"column":35},"end":{"line":83,"column":37}}]}}},"/Users/popomore/code/popomore/rename/lib/parse.js":{"path":"/Users/popomore/code/popomore/rename/lib/parse.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":40,"9":35,"10":35,"11":24,"12":11,"13":11,"14":11,"15":11,"16":35,"17":35,"18":1,"19":24,"20":24},"b":{"1":[40,16],"2":[24,11],"3":[11,9],"4":[11,5],"5":[11,3],"6":[11,10]},"f":{"1":40,"2":24},"fnMap":{"1":{"name":"parse","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":38}}},"2":{"name":"toObject","line":29,"loc":{"start":{"line":29,"column":0},"end":{"line":29,"column":24}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":45}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":40}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":29}},"7":{"start":{"line":10,"column":0},"end":{"line":27,"column":2}},"8":{"start":{"line":11,"column":2},"end":{"line":12,"column":44}},"9":{"start":{"line":14,"column":2},"end":{"line":14,"column":18}},"10":{"start":{"line":16,"column":2},"end":{"line":23,"column":3}},"11":{"start":{"line":17,"column":4},"end":{"line":17,"column":26}},"12":{"start":{"line":19,"column":4},"end":{"line":19,"column":38}},"13":{"start":{"line":20,"column":4},"end":{"line":20,"column":38}},"14":{"start":{"line":21,"column":4},"end":{"line":21,"column":40}},"15":{"start":{"line":22,"column":4},"end":{"line":22,"column":36}},"16":{"start":{"line":25,"column":2},"end":{"line":25,"column":43}},"17":{"start":{"line":26,"column":2},"end":{"line":26,"column":14}},"18":{"start":{"line":29,"column":0},"end":{"line":37,"column":1}},"19":{"start":{"line":30,"column":2},"end":{"line":30,"column":26}},"20":{"start":{"line":31,"column":2},"end":{"line":36,"column":4}}},"branchMap":{"1":{"line":11,"type":"binary-expr","locations":[{"start":{"line":11,"column":9},"end":{"line":11,"column":28}},{"start":{"line":11,"column":32},"end":{"line":11,"column":51}}]},"2":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":16,"column":2}},{"start":{"line":16,"column":2},"end":{"line":16,"column":2}}]},"3":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":19},"end":{"line":19,"column":31}},{"start":{"line":19,"column":35},"end":{"line":19,"column":37}}]},"4":{"line":20,"type":"binary-expr","locations":[{"start":{"line":20,"column":19},"end":{"line":20,"column":31}},{"start":{"line":20,"column":35},"end":{"line":20,"column":37}}]},"5":{"line":21,"type":"binary-expr","locations":[{"start":{"line":21,"column":20},"end":{"line":21,"column":33}},{"start":{"line":21,"column":37},"end":{"line":21,"column":39}}]},"6":{"line":22,"type":"binary-expr","locations":[{"start":{"line":22,"column":18},"end":{"line":22,"column":29}},{"start":{"line":22,"column":33},"end":{"line":22,"column":35}}]}}},"/Users/popomore/code/popomore/rename/lib/util.js":{"path":"/Users/popomore/code/popomore/rename/lib/util.js","s":{"1":1,"2":1,"3":99,"4":1,"5":67,"6":1,"7":24},"b":{},"f":{"1":99,"2":67,"3":24},"fnMap":{"1":{"name":"isString","line":5,"loc":{"start":{"line":5,"column":19},"end":{"line":5,"column":42}}},"2":{"name":"isObject","line":9,"loc":{"start":{"line":9,"column":19},"end":{"line":9,"column":42}}},"3":{"name":"isFunction","line":13,"loc":{"start":{"line":13,"column":21},"end":{"line":13,"column":46}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":41}},"2":{"start":{"line":5,"column":0},"end":{"line":7,"column":2}},"3":{"start":{"line":6,"column":2},"end":{"line":6,"column":50}},"4":{"start":{"line":9,"column":0},"end":{"line":11,"column":2}},"5":{"start":{"line":10,"column":2},"end":{"line":10,"column":50}},"6":{"start":{"line":13,"column":0},"end":{"line":15,"column":2}},"7":{"start":{"line":14,"column":2},"end":{"line":14,"column":52}}},"branchMap":{}},"/Users/popomore/code/popomore/rename/lib/stringify.js":{"path":"/Users/popomore/code/popomore/rename/lib/stringify.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":31,"7":25,"8":25,"9":25,"10":25,"11":25,"12":2,"13":25,"14":25},"b":{"1":[25,9],"2":[25,8],"3":[25,2],"4":[2,23]},"f":{"1":31},"fnMap":{"1":{"name":"stringify","line":8,"loc":{"start":{"line":8,"column":17},"end":{"line":8,"column":41}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":42}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":32}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":42}},"5":{"start":{"line":8,"column":0},"end":{"line":22,"column":2}},"6":{"start":{"line":9,"column":2},"end":{"line":9,"column":54}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":35}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":34}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":36}},"10":{"start":{"line":16,"column":2},"end":{"line":16,"column":59}},"11":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"12":{"start":{"line":18,"column":4},"end":{"line":18,"column":14}},"13":{"start":{"line":20,"column":2},"end":{"line":20,"column":33}},"14":{"start":{"line":21,"column":2},"end":{"line":21,"column":14}}},"branchMap":{"1":{"line":11,"type":"binary-expr","locations":[{"start":{"line":11,"column":16},"end":{"line":11,"column":27}},{"start":{"line":11,"column":31},"end":{"line":11,"column":34}}]},"2":{"line":12,"type":"binary-expr","locations":[{"start":{"line":12,"column":16},"end":{"line":12,"column":27}},{"start":{"line":12,"column":31},"end":{"line":12,"column":33}}]},"3":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":17},"end":{"line":13,"column":29}},{"start":{"line":13,"column":33},"end":{"line":13,"column":35}}]},"4":{"line":17,"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":17,"column":2}},{"start":{"line":17,"column":2},"end":{"line":17,"column":2}}]}}}} |
@@ -0,1 +1,5 @@ | ||
## 1.0.2 / 2015-02-15 | ||
- fix: should clone transformer object | ||
## 1.0.1 / 2015-02-13 | ||
@@ -2,0 +6,0 @@ |
14
index.js
@@ -59,3 +59,3 @@ 'use strict'; | ||
function transform(fileObj, transformed) { | ||
parseTemplate(transformed, fileObj); | ||
transformed = parseTemplate(transformed, fileObj); | ||
var result = {}; | ||
@@ -77,9 +77,13 @@ result.dirname = choose('dirname', transformed, fileObj); | ||
// parse template like ${xxx} in transformed using file object | ||
var RE_REPLACE = /\$\{?([a-zA-Z0-9-_]*)\}?/g; | ||
function parseTemplate(transformed, fileObj) { | ||
var result = {}; | ||
Object.keys(transformed).forEach(function(key) { | ||
if (!transformed[key]) {return;} | ||
transformed[key] = transformed[key].replace(/\$\{?([a-zA-Z0-9-_]*)\}?/g, function(_, matched) { | ||
return fileObj[matched] || ''; | ||
}); | ||
result[key] = !transformed[key] ? | ||
transformed[key] : | ||
transformed[key].replace(RE_REPLACE, function(_, matched) { | ||
return fileObj[matched] || ''; | ||
}); | ||
}); | ||
return result; | ||
} |
{ | ||
"name": "rename", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Rename files using some transformers.", | ||
@@ -5,0 +5,0 @@ "main": "index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136720
205