Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

better-curry

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-curry - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

coverage/coverage.json

@@ -1,1 +0,1 @@

{"C:\\Inetpub\\js-bettercurry\\index.js":{"path":"C:\\Inetpub\\js-bettercurry\\index.js","s":{"1":1,"2":1,"3":1,"4":0,"5":0,"6":0,"7":1,"8":48,"9":48,"10":22,"11":22,"12":22,"13":88,"14":48,"15":2,"16":2,"17":5,"18":5,"19":7,"20":7,"21":5,"22":5,"23":7,"24":7,"25":6,"26":6,"27":4,"28":4,"29":4,"30":4,"31":4,"32":4,"33":4,"34":4,"35":1,"36":24,"37":24,"38":24,"39":24,"40":24,"41":24},"b":{"1":[1,0],"2":[1,1],"3":[0,0],"4":[0,0],"5":[22,26],"6":[48,24,24,3],"7":[4,84],"8":[2,5,7,5,7,6,4,4,4],"9":[1,1],"10":[3,2],"11":[2,1],"12":[1,1],"13":[3,4],"14":[2,1],"15":[2,1],"16":[1,3],"17":[1,3],"18":[3,2],"19":[1,2],"20":[1,2],"21":[1,2],"22":[1,1],"23":[1,1],"24":[1,1],"25":[3,4],"26":[2,1],"27":[2,1],"28":[2,1],"29":[2,1],"30":[2,2],"31":[2,2],"32":[2,2],"33":[2,2],"34":[3,3],"35":[2,1],"36":[2,1],"37":[2,1],"38":[2,1],"39":[2,1],"40":[1,2],"41":[1,2],"42":[1,2],"43":[1,2],"44":[1,2],"45":[2,2],"46":[1,1],"47":[1,1],"48":[1,1],"49":[1,1],"50":[1,1],"51":[1,1],"52":[1,1],"53":[1,1],"54":[1,1],"55":[1,1],"56":[1,1],"57":[1,1],"58":[2,2],"59":[1,1],"60":[1,1],"61":[1,1],"62":[1,1],"63":[1,1],"64":[1,1],"65":[1,1],"66":[1,1],"67":[1,1],"68":[1,1],"69":[1,1],"70":[1,1],"71":[1,1],"72":[1,1],"73":[2,2],"74":[1,1],"75":[1,1],"76":[1,1],"77":[1,1],"78":[1,1],"79":[1,1],"80":[1,1],"81":[1,1],"82":[1,1],"83":[1,1],"84":[1,1],"85":[1,1],"86":[1,1],"87":[1,1],"88":[1,1],"89":[1,1],"90":[24,20],"91":[24,11],"92":[24,21],"93":[24,14]},"f":{"1":1,"2":1,"3":48,"4":88,"5":2,"6":5,"7":7,"8":5,"9":7,"10":6,"11":4,"12":4,"13":4,"14":4,"15":24,"16":24},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":25}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":8},"end":{"line":14,"column":19}}},"3":{"name":"template","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":17,"column":43}}},"4":{"name":"(anonymous_4)","line":30,"loc":{"start":{"line":30,"column":16},"end":{"line":30,"column":37}}},"5":{"name":"zeroArgs","line":37,"loc":{"start":{"line":37,"column":15},"end":{"line":37,"column":34}}},"6":{"name":"oneArg","line":43,"loc":{"start":{"line":43,"column":15},"end":{"line":43,"column":36}}},"7":{"name":"twoArgs","line":53,"loc":{"start":{"line":53,"column":15},"end":{"line":53,"column":43}}},"8":{"name":"threeArgs","line":65,"loc":{"start":{"line":65,"column":15},"end":{"line":65,"column":51}}},"9":{"name":"fourArgs","line":79,"loc":{"start":{"line":79,"column":15},"end":{"line":79,"column":56}}},"10":{"name":"fiveArgs","line":95,"loc":{"start":{"line":95,"column":15},"end":{"line":95,"column":62}}},"11":{"name":"sixArgs","line":113,"loc":{"start":{"line":113,"column":15},"end":{"line":113,"column":67}}},"12":{"name":"sevenArgs","line":133,"loc":{"start":{"line":133,"column":15},"end":{"line":133,"column":75}}},"13":{"name":"eightArgs","line":155,"loc":{"start":{"line":155,"column":15},"end":{"line":155,"column":81}}},"14":{"name":"variadic","line":181,"loc":{"start":{"line":181,"column":11},"end":{"line":181,"column":30}}},"15":{"name":"(anonymous_15)","line":187,"loc":{"start":{"line":187,"column":10},"end":{"line":187,"column":36}}},"16":{"name":"(anonymous_16)","line":194,"loc":{"start":{"line":194,"column":15},"end":{"line":194,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":202,"column":4}},"2":{"start":{"line":5,"column":2},"end":{"line":13,"column":3},"skip":true},"3":{"start":{"line":6,"column":4},"end":{"line":6,"column":31},"skip":true},"4":{"start":{"line":7,"column":9},"end":{"line":13,"column":3},"skip":true},"5":{"start":{"line":9,"column":4},"end":{"line":9,"column":24},"skip":true},"6":{"start":{"line":12,"column":4},"end":{"line":12,"column":33},"skip":true},"7":{"start":{"line":17,"column":2},"end":{"line":184,"column":3}},"8":{"start":{"line":18,"column":4},"end":{"line":21,"column":22}},"9":{"start":{"line":23,"column":4},"end":{"line":33,"column":5}},"10":{"start":{"line":24,"column":6},"end":{"line":24,"column":50}},"11":{"start":{"line":26,"column":6},"end":{"line":28,"column":25}},"12":{"start":{"line":30,"column":6},"end":{"line":32,"column":8}},"13":{"start":{"line":31,"column":8},"end":{"line":31,"column":85}},"14":{"start":{"line":35,"column":4},"end":{"line":178,"column":5}},"15":{"start":{"line":37,"column":8},"end":{"line":41,"column":10}},"16":{"start":{"line":38,"column":10},"end":{"line":40,"column":31}},"17":{"start":{"line":43,"column":8},"end":{"line":51,"column":10}},"18":{"start":{"line":44,"column":10},"end":{"line":50,"column":16}},"19":{"start":{"line":53,"column":8},"end":{"line":63,"column":10}},"20":{"start":{"line":54,"column":10},"end":{"line":62,"column":16}},"21":{"start":{"line":65,"column":8},"end":{"line":77,"column":10}},"22":{"start":{"line":66,"column":10},"end":{"line":76,"column":16}},"23":{"start":{"line":79,"column":8},"end":{"line":93,"column":10}},"24":{"start":{"line":80,"column":10},"end":{"line":92,"column":16}},"25":{"start":{"line":95,"column":8},"end":{"line":111,"column":10}},"26":{"start":{"line":96,"column":10},"end":{"line":110,"column":16}},"27":{"start":{"line":113,"column":8},"end":{"line":131,"column":10}},"28":{"start":{"line":114,"column":10},"end":{"line":130,"column":16}},"29":{"start":{"line":133,"column":8},"end":{"line":153,"column":10}},"30":{"start":{"line":134,"column":10},"end":{"line":152,"column":16}},"31":{"start":{"line":155,"column":8},"end":{"line":177,"column":10}},"32":{"start":{"line":156,"column":10},"end":{"line":176,"column":16}},"33":{"start":{"line":181,"column":4},"end":{"line":183,"column":6}},"34":{"start":{"line":182,"column":6},"end":{"line":182,"column":87}},"35":{"start":{"line":186,"column":2},"end":{"line":201,"column":4}},"36":{"start":{"line":188,"column":6},"end":{"line":188,"column":29}},"37":{"start":{"line":190,"column":6},"end":{"line":190,"column":32}},"38":{"start":{"line":192,"column":6},"end":{"line":192,"column":40}},"39":{"start":{"line":195,"column":6},"end":{"line":195,"column":29}},"40":{"start":{"line":197,"column":6},"end":{"line":197,"column":32}},"41":{"start":{"line":199,"column":6},"end":{"line":199,"column":46}}},"branchMap":{"1":{"line":5,"type":"if","locations":[{"start":{"line":5,"column":2},"end":{"line":5,"column":2},"skip":true},{"start":{"line":5,"column":2},"end":{"line":5,"column":2},"skip":true}]},"2":{"line":5,"type":"binary-expr","locations":[{"start":{"line":5,"column":6},"end":{"line":5,"column":32},"skip":true},{"start":{"line":5,"column":36},"end":{"line":5,"column":70},"skip":true}]},"3":{"line":7,"type":"if","locations":[{"start":{"line":7,"column":9},"end":{"line":7,"column":9},"skip":true},{"start":{"line":7,"column":9},"end":{"line":7,"column":9},"skip":true}]},"4":{"line":7,"type":"binary-expr","locations":[{"start":{"line":7,"column":13},"end":{"line":7,"column":41},"skip":true},{"start":{"line":7,"column":45},"end":{"line":7,"column":55},"skip":true}]},"5":{"line":23,"type":"if","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":4}},{"start":{"line":23,"column":4},"end":{"line":23,"column":4}}]},"6":{"line":23,"type":"binary-expr","locations":[{"start":{"line":23,"column":8},"end":{"line":23,"column":35}},{"start":{"line":23,"column":39},"end":{"line":23,"column":50}},{"start":{"line":23,"column":55},"end":{"line":23,"column":62}},{"start":{"line":23,"column":66},"end":{"line":23,"column":76}}]},"7":{"line":31,"type":"cond-expr","locations":[{"start":{"line":31,"column":33},"end":{"line":31,"column":37}},{"start":{"line":31,"column":40},"end":{"line":31,"column":67}}]},"8":{"line":35,"type":"switch","locations":[{"start":{"line":36,"column":6},"end":{"line":41,"column":10}},{"start":{"line":42,"column":6},"end":{"line":51,"column":10}},{"start":{"line":52,"column":6},"end":{"line":63,"column":10}},{"start":{"line":64,"column":6},"end":{"line":77,"column":10}},{"start":{"line":78,"column":6},"end":{"line":93,"column":10}},{"start":{"line":94,"column":6},"end":{"line":111,"column":10}},{"start":{"line":112,"column":6},"end":{"line":131,"column":10}},{"start":{"line":132,"column":6},"end":{"line":153,"column":10}},{"start":{"line":154,"column":6},"end":{"line":177,"column":10}}]},"9":{"line":38,"type":"cond-expr","locations":[{"start":{"line":39,"column":14},"end":{"line":39,"column":18}},{"start":{"line":40,"column":14},"end":{"line":40,"column":30}}]},"10":{"line":44,"type":"cond-expr","locations":[{"start":{"line":45,"column":14},"end":{"line":47,"column":15}},{"start":{"line":48,"column":14},"end":{"line":50,"column":15}}]},"11":{"line":46,"type":"cond-expr","locations":[{"start":{"line":46,"column":26},"end":{"line":46,"column":42}},{"start":{"line":46,"column":45},"end":{"line":46,"column":49}}]},"12":{"line":49,"type":"cond-expr","locations":[{"start":{"line":49,"column":26},"end":{"line":49,"column":42}},{"start":{"line":49,"column":45},"end":{"line":49,"column":49}}]},"13":{"line":54,"type":"cond-expr","locations":[{"start":{"line":55,"column":14},"end":{"line":58,"column":15}},{"start":{"line":59,"column":14},"end":{"line":62,"column":15}}]},"14":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":26},"end":{"line":56,"column":42}},{"start":{"line":56,"column":45},"end":{"line":56,"column":49}}]},"15":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":26},"end":{"line":57,"column":42}},{"start":{"line":57,"column":45},"end":{"line":57,"column":49}}]},"16":{"line":60,"type":"cond-expr","locations":[{"start":{"line":60,"column":26},"end":{"line":60,"column":42}},{"start":{"line":60,"column":45},"end":{"line":60,"column":49}}]},"17":{"line":61,"type":"cond-expr","locations":[{"start":{"line":61,"column":26},"end":{"line":61,"column":42}},{"start":{"line":61,"column":45},"end":{"line":61,"column":49}}]},"18":{"line":66,"type":"cond-expr","locations":[{"start":{"line":67,"column":14},"end":{"line":71,"column":15}},{"start":{"line":72,"column":14},"end":{"line":76,"column":15}}]},"19":{"line":68,"type":"cond-expr","locations":[{"start":{"line":68,"column":26},"end":{"line":68,"column":42}},{"start":{"line":68,"column":45},"end":{"line":68,"column":49}}]},"20":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":26},"end":{"line":69,"column":42}},{"start":{"line":69,"column":45},"end":{"line":69,"column":49}}]},"21":{"line":70,"type":"cond-expr","locations":[{"start":{"line":70,"column":26},"end":{"line":70,"column":42}},{"start":{"line":70,"column":45},"end":{"line":70,"column":49}}]},"22":{"line":73,"type":"cond-expr","locations":[{"start":{"line":73,"column":26},"end":{"line":73,"column":42}},{"start":{"line":73,"column":45},"end":{"line":73,"column":49}}]},"23":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":26},"end":{"line":74,"column":42}},{"start":{"line":74,"column":45},"end":{"line":74,"column":49}}]},"24":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":26},"end":{"line":75,"column":42}},{"start":{"line":75,"column":45},"end":{"line":75,"column":49}}]},"25":{"line":80,"type":"cond-expr","locations":[{"start":{"line":81,"column":14},"end":{"line":86,"column":15}},{"start":{"line":87,"column":14},"end":{"line":92,"column":15}}]},"26":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":26},"end":{"line":82,"column":42}},{"start":{"line":82,"column":45},"end":{"line":82,"column":49}}]},"27":{"line":83,"type":"cond-expr","locations":[{"start":{"line":83,"column":26},"end":{"line":83,"column":42}},{"start":{"line":83,"column":45},"end":{"line":83,"column":49}}]},"28":{"line":84,"type":"cond-expr","locations":[{"start":{"line":84,"column":26},"end":{"line":84,"column":42}},{"start":{"line":84,"column":45},"end":{"line":84,"column":49}}]},"29":{"line":85,"type":"cond-expr","locations":[{"start":{"line":85,"column":26},"end":{"line":85,"column":42}},{"start":{"line":85,"column":45},"end":{"line":85,"column":49}}]},"30":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":26},"end":{"line":88,"column":42}},{"start":{"line":88,"column":45},"end":{"line":88,"column":49}}]},"31":{"line":89,"type":"cond-expr","locations":[{"start":{"line":89,"column":26},"end":{"line":89,"column":42}},{"start":{"line":89,"column":45},"end":{"line":89,"column":49}}]},"32":{"line":90,"type":"cond-expr","locations":[{"start":{"line":90,"column":26},"end":{"line":90,"column":42}},{"start":{"line":90,"column":45},"end":{"line":90,"column":49}}]},"33":{"line":91,"type":"cond-expr","locations":[{"start":{"line":91,"column":26},"end":{"line":91,"column":42}},{"start":{"line":91,"column":45},"end":{"line":91,"column":49}}]},"34":{"line":96,"type":"cond-expr","locations":[{"start":{"line":97,"column":14},"end":{"line":103,"column":15}},{"start":{"line":104,"column":14},"end":{"line":110,"column":15}}]},"35":{"line":98,"type":"cond-expr","locations":[{"start":{"line":98,"column":26},"end":{"line":98,"column":42}},{"start":{"line":98,"column":45},"end":{"line":98,"column":49}}]},"36":{"line":99,"type":"cond-expr","locations":[{"start":{"line":99,"column":26},"end":{"line":99,"column":42}},{"start":{"line":99,"column":45},"end":{"line":99,"column":49}}]},"37":{"line":100,"type":"cond-expr","locations":[{"start":{"line":100,"column":26},"end":{"line":100,"column":42}},{"start":{"line":100,"column":45},"end":{"line":100,"column":49}}]},"38":{"line":101,"type":"cond-expr","locations":[{"start":{"line":101,"column":26},"end":{"line":101,"column":42}},{"start":{"line":101,"column":45},"end":{"line":101,"column":49}}]},"39":{"line":102,"type":"cond-expr","locations":[{"start":{"line":102,"column":26},"end":{"line":102,"column":42}},{"start":{"line":102,"column":45},"end":{"line":102,"column":49}}]},"40":{"line":105,"type":"cond-expr","locations":[{"start":{"line":105,"column":26},"end":{"line":105,"column":42}},{"start":{"line":105,"column":45},"end":{"line":105,"column":49}}]},"41":{"line":106,"type":"cond-expr","locations":[{"start":{"line":106,"column":26},"end":{"line":106,"column":42}},{"start":{"line":106,"column":45},"end":{"line":106,"column":49}}]},"42":{"line":107,"type":"cond-expr","locations":[{"start":{"line":107,"column":26},"end":{"line":107,"column":42}},{"start":{"line":107,"column":45},"end":{"line":107,"column":49}}]},"43":{"line":108,"type":"cond-expr","locations":[{"start":{"line":108,"column":26},"end":{"line":108,"column":42}},{"start":{"line":108,"column":45},"end":{"line":108,"column":49}}]},"44":{"line":109,"type":"cond-expr","locations":[{"start":{"line":109,"column":26},"end":{"line":109,"column":42}},{"start":{"line":109,"column":45},"end":{"line":109,"column":49}}]},"45":{"line":114,"type":"cond-expr","locations":[{"start":{"line":115,"column":14},"end":{"line":122,"column":15}},{"start":{"line":123,"column":14},"end":{"line":130,"column":15}}]},"46":{"line":116,"type":"cond-expr","locations":[{"start":{"line":116,"column":26},"end":{"line":116,"column":42}},{"start":{"line":116,"column":45},"end":{"line":116,"column":49}}]},"47":{"line":117,"type":"cond-expr","locations":[{"start":{"line":117,"column":26},"end":{"line":117,"column":42}},{"start":{"line":117,"column":45},"end":{"line":117,"column":49}}]},"48":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":26},"end":{"line":118,"column":42}},{"start":{"line":118,"column":45},"end":{"line":118,"column":49}}]},"49":{"line":119,"type":"cond-expr","locations":[{"start":{"line":119,"column":26},"end":{"line":119,"column":42}},{"start":{"line":119,"column":45},"end":{"line":119,"column":49}}]},"50":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":26},"end":{"line":120,"column":42}},{"start":{"line":120,"column":45},"end":{"line":120,"column":49}}]},"51":{"line":121,"type":"cond-expr","locations":[{"start":{"line":121,"column":26},"end":{"line":121,"column":42}},{"start":{"line":121,"column":45},"end":{"line":121,"column":49}}]},"52":{"line":124,"type":"cond-expr","locations":[{"start":{"line":124,"column":26},"end":{"line":124,"column":42}},{"start":{"line":124,"column":45},"end":{"line":124,"column":49}}]},"53":{"line":125,"type":"cond-expr","locations":[{"start":{"line":125,"column":26},"end":{"line":125,"column":42}},{"start":{"line":125,"column":45},"end":{"line":125,"column":49}}]},"54":{"line":126,"type":"cond-expr","locations":[{"start":{"line":126,"column":26},"end":{"line":126,"column":42}},{"start":{"line":126,"column":45},"end":{"line":126,"column":49}}]},"55":{"line":127,"type":"cond-expr","locations":[{"start":{"line":127,"column":26},"end":{"line":127,"column":42}},{"start":{"line":127,"column":45},"end":{"line":127,"column":49}}]},"56":{"line":128,"type":"cond-expr","locations":[{"start":{"line":128,"column":26},"end":{"line":128,"column":42}},{"start":{"line":128,"column":45},"end":{"line":128,"column":49}}]},"57":{"line":129,"type":"cond-expr","locations":[{"start":{"line":129,"column":26},"end":{"line":129,"column":42}},{"start":{"line":129,"column":45},"end":{"line":129,"column":49}}]},"58":{"line":134,"type":"cond-expr","locations":[{"start":{"line":135,"column":14},"end":{"line":143,"column":15}},{"start":{"line":144,"column":14},"end":{"line":152,"column":15}}]},"59":{"line":136,"type":"cond-expr","locations":[{"start":{"line":136,"column":26},"end":{"line":136,"column":42}},{"start":{"line":136,"column":45},"end":{"line":136,"column":49}}]},"60":{"line":137,"type":"cond-expr","locations":[{"start":{"line":137,"column":26},"end":{"line":137,"column":42}},{"start":{"line":137,"column":45},"end":{"line":137,"column":49}}]},"61":{"line":138,"type":"cond-expr","locations":[{"start":{"line":138,"column":26},"end":{"line":138,"column":42}},{"start":{"line":138,"column":45},"end":{"line":138,"column":49}}]},"62":{"line":139,"type":"cond-expr","locations":[{"start":{"line":139,"column":26},"end":{"line":139,"column":42}},{"start":{"line":139,"column":45},"end":{"line":139,"column":49}}]},"63":{"line":140,"type":"cond-expr","locations":[{"start":{"line":140,"column":26},"end":{"line":140,"column":42}},{"start":{"line":140,"column":45},"end":{"line":140,"column":49}}]},"64":{"line":141,"type":"cond-expr","locations":[{"start":{"line":141,"column":26},"end":{"line":141,"column":42}},{"start":{"line":141,"column":45},"end":{"line":141,"column":49}}]},"65":{"line":142,"type":"cond-expr","locations":[{"start":{"line":142,"column":26},"end":{"line":142,"column":42}},{"start":{"line":142,"column":45},"end":{"line":142,"column":49}}]},"66":{"line":145,"type":"cond-expr","locations":[{"start":{"line":145,"column":26},"end":{"line":145,"column":42}},{"start":{"line":145,"column":45},"end":{"line":145,"column":49}}]},"67":{"line":146,"type":"cond-expr","locations":[{"start":{"line":146,"column":26},"end":{"line":146,"column":42}},{"start":{"line":146,"column":45},"end":{"line":146,"column":49}}]},"68":{"line":147,"type":"cond-expr","locations":[{"start":{"line":147,"column":26},"end":{"line":147,"column":42}},{"start":{"line":147,"column":45},"end":{"line":147,"column":49}}]},"69":{"line":148,"type":"cond-expr","locations":[{"start":{"line":148,"column":26},"end":{"line":148,"column":42}},{"start":{"line":148,"column":45},"end":{"line":148,"column":49}}]},"70":{"line":149,"type":"cond-expr","locations":[{"start":{"line":149,"column":26},"end":{"line":149,"column":42}},{"start":{"line":149,"column":45},"end":{"line":149,"column":49}}]},"71":{"line":150,"type":"cond-expr","locations":[{"start":{"line":150,"column":26},"end":{"line":150,"column":42}},{"start":{"line":150,"column":45},"end":{"line":150,"column":49}}]},"72":{"line":151,"type":"cond-expr","locations":[{"start":{"line":151,"column":26},"end":{"line":151,"column":42}},{"start":{"line":151,"column":45},"end":{"line":151,"column":49}}]},"73":{"line":156,"type":"cond-expr","locations":[{"start":{"line":157,"column":14},"end":{"line":166,"column":15}},{"start":{"line":167,"column":14},"end":{"line":176,"column":15}}]},"74":{"line":158,"type":"cond-expr","locations":[{"start":{"line":158,"column":26},"end":{"line":158,"column":42}},{"start":{"line":158,"column":45},"end":{"line":158,"column":49}}]},"75":{"line":159,"type":"cond-expr","locations":[{"start":{"line":159,"column":26},"end":{"line":159,"column":42}},{"start":{"line":159,"column":45},"end":{"line":159,"column":49}}]},"76":{"line":160,"type":"cond-expr","locations":[{"start":{"line":160,"column":26},"end":{"line":160,"column":42}},{"start":{"line":160,"column":45},"end":{"line":160,"column":49}}]},"77":{"line":161,"type":"cond-expr","locations":[{"start":{"line":161,"column":26},"end":{"line":161,"column":42}},{"start":{"line":161,"column":45},"end":{"line":161,"column":49}}]},"78":{"line":162,"type":"cond-expr","locations":[{"start":{"line":162,"column":26},"end":{"line":162,"column":42}},{"start":{"line":162,"column":45},"end":{"line":162,"column":49}}]},"79":{"line":163,"type":"cond-expr","locations":[{"start":{"line":163,"column":26},"end":{"line":163,"column":42}},{"start":{"line":163,"column":45},"end":{"line":163,"column":49}}]},"80":{"line":164,"type":"cond-expr","locations":[{"start":{"line":164,"column":26},"end":{"line":164,"column":42}},{"start":{"line":164,"column":45},"end":{"line":164,"column":49}}]},"81":{"line":165,"type":"cond-expr","locations":[{"start":{"line":165,"column":26},"end":{"line":165,"column":42}},{"start":{"line":165,"column":45},"end":{"line":165,"column":49}}]},"82":{"line":168,"type":"cond-expr","locations":[{"start":{"line":168,"column":26},"end":{"line":168,"column":42}},{"start":{"line":168,"column":45},"end":{"line":168,"column":49}}]},"83":{"line":169,"type":"cond-expr","locations":[{"start":{"line":169,"column":26},"end":{"line":169,"column":42}},{"start":{"line":169,"column":45},"end":{"line":169,"column":49}}]},"84":{"line":170,"type":"cond-expr","locations":[{"start":{"line":170,"column":26},"end":{"line":170,"column":42}},{"start":{"line":170,"column":45},"end":{"line":170,"column":49}}]},"85":{"line":171,"type":"cond-expr","locations":[{"start":{"line":171,"column":26},"end":{"line":171,"column":42}},{"start":{"line":171,"column":45},"end":{"line":171,"column":49}}]},"86":{"line":172,"type":"cond-expr","locations":[{"start":{"line":172,"column":26},"end":{"line":172,"column":42}},{"start":{"line":172,"column":45},"end":{"line":172,"column":49}}]},"87":{"line":173,"type":"cond-expr","locations":[{"start":{"line":173,"column":26},"end":{"line":173,"column":42}},{"start":{"line":173,"column":45},"end":{"line":173,"column":49}}]},"88":{"line":174,"type":"cond-expr","locations":[{"start":{"line":174,"column":26},"end":{"line":174,"column":42}},{"start":{"line":174,"column":45},"end":{"line":174,"column":49}}]},"89":{"line":175,"type":"cond-expr","locations":[{"start":{"line":175,"column":26},"end":{"line":175,"column":42}},{"start":{"line":175,"column":45},"end":{"line":175,"column":49}}]},"90":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":12},"end":{"line":188,"column":15}},{"start":{"line":188,"column":19},"end":{"line":188,"column":28}}]},"91":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":16},"end":{"line":190,"column":23}},{"start":{"line":190,"column":27},"end":{"line":190,"column":31}}]},"92":{"line":195,"type":"binary-expr","locations":[{"start":{"line":195,"column":12},"end":{"line":195,"column":15}},{"start":{"line":195,"column":19},"end":{"line":195,"column":28}}]},"93":{"line":197,"type":"binary-expr","locations":[{"start":{"line":197,"column":16},"end":{"line":197,"column":23}},{"start":{"line":197,"column":27},"end":{"line":197,"column":31}}]}}}}
{"C:\\Inetpub\\js-bettercurry\\index.js":{"path":"C:\\Inetpub\\js-bettercurry\\index.js","s":{"1":1,"2":1,"3":1,"4":0,"5":0,"6":0,"7":1,"8":52,"9":52,"10":23,"11":23,"12":23,"13":89,"14":52,"15":3,"16":2,"17":8,"18":8,"19":7,"20":7,"21":5,"22":5,"23":7,"24":7,"25":6,"26":6,"27":4,"28":4,"29":4,"30":4,"31":4,"32":4,"33":4,"34":4,"35":1,"36":27,"37":27,"38":27,"39":1,"40":25,"41":25,"42":25,"43":25,"44":1,"45":16,"46":8,"47":8,"48":8,"49":8,"50":8,"51":8,"52":1,"53":11,"54":11,"55":1,"56":4,"57":4,"58":4,"59":4,"60":1,"61":3,"62":3,"63":3,"64":5,"65":3,"66":1,"67":4,"68":4,"69":4,"70":2,"71":4,"72":1,"73":2,"74":1,"75":6,"76":5,"77":5,"78":1,"79":1,"80":1,"81":4,"82":4,"83":2,"84":2,"85":4,"86":6,"87":1},"b":{"1":[1,0],"2":[1,1],"3":[0,0],"4":[0,0],"5":[23,29],"6":[52,25,25,3],"7":[4,85],"8":[3,8,7,5,7,6,4,4,4],"9":[1,1],"10":[3,5],"11":[2,1],"12":[2,3],"13":[3,4],"14":[2,1],"15":[2,1],"16":[1,3],"17":[1,3],"18":[3,2],"19":[1,2],"20":[1,2],"21":[1,2],"22":[1,1],"23":[1,1],"24":[1,1],"25":[3,4],"26":[2,1],"27":[2,1],"28":[2,1],"29":[2,1],"30":[2,2],"31":[2,2],"32":[2,2],"33":[2,2],"34":[3,3],"35":[2,1],"36":[2,1],"37":[2,1],"38":[2,1],"39":[2,1],"40":[1,2],"41":[1,2],"42":[1,2],"43":[1,2],"44":[1,2],"45":[2,2],"46":[1,1],"47":[1,1],"48":[1,1],"49":[1,1],"50":[1,1],"51":[1,1],"52":[1,1],"53":[1,1],"54":[1,1],"55":[1,1],"56":[1,1],"57":[1,1],"58":[2,2],"59":[1,1],"60":[1,1],"61":[1,1],"62":[1,1],"63":[1,1],"64":[1,1],"65":[1,1],"66":[1,1],"67":[1,1],"68":[1,1],"69":[1,1],"70":[1,1],"71":[1,1],"72":[1,1],"73":[2,2],"74":[1,1],"75":[1,1],"76":[1,1],"77":[1,1],"78":[1,1],"79":[1,1],"80":[1,1],"81":[1,1],"82":[1,1],"83":[1,1],"84":[1,1],"85":[1,1],"86":[1,1],"87":[1,1],"88":[1,1],"89":[1,1],"90":[27,23],"91":[27,11],"92":[25,22],"93":[25,14],"94":[8,8],"95":[4,7],"96":[2,2],"97":[4,7],"98":[1,3],"99":[4,7],"100":[1,3],"101":[5,1],"102":[1,1,3,4],"103":[2,2]},"f":{"1":1,"2":1,"3":52,"4":89,"5":2,"6":8,"7":7,"8":5,"9":7,"10":6,"11":4,"12":4,"13":4,"14":4,"15":27,"16":25,"17":16,"18":11,"19":4,"20":3,"21":5,"22":4,"23":2,"24":2,"25":6},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":25}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":8},"end":{"line":14,"column":19}}},"3":{"name":"template","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":17,"column":43}}},"4":{"name":"(anonymous_4)","line":30,"loc":{"start":{"line":30,"column":16},"end":{"line":30,"column":38}}},"5":{"name":"zeroArgs","line":37,"loc":{"start":{"line":37,"column":15},"end":{"line":37,"column":34}}},"6":{"name":"oneArg","line":43,"loc":{"start":{"line":43,"column":15},"end":{"line":43,"column":36}}},"7":{"name":"twoArgs","line":53,"loc":{"start":{"line":53,"column":15},"end":{"line":53,"column":43}}},"8":{"name":"threeArgs","line":65,"loc":{"start":{"line":65,"column":15},"end":{"line":65,"column":51}}},"9":{"name":"fourArgs","line":79,"loc":{"start":{"line":79,"column":15},"end":{"line":79,"column":56}}},"10":{"name":"fiveArgs","line":95,"loc":{"start":{"line":95,"column":15},"end":{"line":95,"column":62}}},"11":{"name":"sixArgs","line":113,"loc":{"start":{"line":113,"column":15},"end":{"line":113,"column":67}}},"12":{"name":"sevenArgs","line":133,"loc":{"start":{"line":133,"column":15},"end":{"line":133,"column":75}}},"13":{"name":"eightArgs","line":155,"loc":{"start":{"line":155,"column":15},"end":{"line":155,"column":81}}},"14":{"name":"variadic","line":181,"loc":{"start":{"line":181,"column":11},"end":{"line":181,"column":30}}},"15":{"name":"Wrap","line":194,"loc":{"start":{"line":194,"column":2},"end":{"line":194,"column":33}}},"16":{"name":"Predefine","line":211,"loc":{"start":{"line":211,"column":2},"end":{"line":211,"column":44}}},"17":{"name":"Delegate","line":228,"loc":{"start":{"line":228,"column":2},"end":{"line":228,"column":34}}},"18":{"name":"extract","line":239,"loc":{"start":{"line":239,"column":2},"end":{"line":239,"column":24}}},"19":{"name":"(anonymous_19)","line":257,"loc":{"start":{"line":257,"column":30},"end":{"line":257,"column":45}}},"20":{"name":"(anonymous_20)","line":278,"loc":{"start":{"line":278,"column":30},"end":{"line":278,"column":45}}},"21":{"name":"(anonymous_21)","line":287,"loc":{"start":{"line":287,"column":20},"end":{"line":287,"column":31}}},"22":{"name":"(anonymous_22)","line":303,"loc":{"start":{"line":303,"column":30},"end":{"line":303,"column":45}}},"23":{"name":"(anonymous_23)","line":312,"loc":{"start":{"line":312,"column":20},"end":{"line":312,"column":34}}},"24":{"name":"(anonymous_24)","line":328,"loc":{"start":{"line":328,"column":30},"end":{"line":328,"column":45}}},"25":{"name":"(anonymous_25)","line":339,"loc":{"start":{"line":339,"column":30},"end":{"line":339,"column":51}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":367,"column":4}},"2":{"start":{"line":5,"column":2},"end":{"line":13,"column":3},"skip":true},"3":{"start":{"line":6,"column":4},"end":{"line":6,"column":31},"skip":true},"4":{"start":{"line":7,"column":9},"end":{"line":13,"column":3},"skip":true},"5":{"start":{"line":9,"column":4},"end":{"line":9,"column":24},"skip":true},"6":{"start":{"line":12,"column":4},"end":{"line":12,"column":33},"skip":true},"7":{"start":{"line":17,"column":2},"end":{"line":184,"column":3}},"8":{"start":{"line":18,"column":4},"end":{"line":21,"column":22}},"9":{"start":{"line":23,"column":4},"end":{"line":33,"column":5}},"10":{"start":{"line":24,"column":6},"end":{"line":24,"column":50}},"11":{"start":{"line":26,"column":6},"end":{"line":28,"column":25}},"12":{"start":{"line":30,"column":6},"end":{"line":32,"column":8}},"13":{"start":{"line":31,"column":8},"end":{"line":31,"column":85}},"14":{"start":{"line":35,"column":4},"end":{"line":178,"column":5}},"15":{"start":{"line":37,"column":8},"end":{"line":41,"column":10}},"16":{"start":{"line":38,"column":10},"end":{"line":40,"column":31}},"17":{"start":{"line":43,"column":8},"end":{"line":51,"column":10}},"18":{"start":{"line":44,"column":10},"end":{"line":50,"column":12}},"19":{"start":{"line":53,"column":8},"end":{"line":63,"column":10}},"20":{"start":{"line":54,"column":10},"end":{"line":62,"column":12}},"21":{"start":{"line":65,"column":8},"end":{"line":77,"column":10}},"22":{"start":{"line":66,"column":10},"end":{"line":76,"column":12}},"23":{"start":{"line":79,"column":8},"end":{"line":93,"column":10}},"24":{"start":{"line":80,"column":10},"end":{"line":92,"column":12}},"25":{"start":{"line":95,"column":8},"end":{"line":111,"column":10}},"26":{"start":{"line":96,"column":10},"end":{"line":110,"column":12}},"27":{"start":{"line":113,"column":8},"end":{"line":131,"column":10}},"28":{"start":{"line":114,"column":10},"end":{"line":130,"column":12}},"29":{"start":{"line":133,"column":8},"end":{"line":153,"column":10}},"30":{"start":{"line":134,"column":10},"end":{"line":152,"column":12}},"31":{"start":{"line":155,"column":8},"end":{"line":177,"column":10}},"32":{"start":{"line":156,"column":10},"end":{"line":176,"column":12}},"33":{"start":{"line":181,"column":4},"end":{"line":183,"column":6}},"34":{"start":{"line":182,"column":6},"end":{"line":182,"column":87}},"35":{"start":{"line":194,"column":2},"end":{"line":200,"column":3}},"36":{"start":{"line":195,"column":4},"end":{"line":195,"column":27}},"37":{"start":{"line":197,"column":4},"end":{"line":197,"column":30}},"38":{"start":{"line":199,"column":4},"end":{"line":199,"column":38}},"39":{"start":{"line":211,"column":2},"end":{"line":219,"column":3}},"40":{"start":{"line":212,"column":4},"end":{"line":212,"column":27}},"41":{"start":{"line":214,"column":4},"end":{"line":214,"column":30}},"42":{"start":{"line":216,"column":4},"end":{"line":216,"column":40}},"43":{"start":{"line":218,"column":4},"end":{"line":218,"column":44}},"44":{"start":{"line":228,"column":2},"end":{"line":237,"column":3}},"45":{"start":{"line":229,"column":4},"end":{"line":231,"column":5}},"46":{"start":{"line":230,"column":6},"end":{"line":230,"column":41}},"47":{"start":{"line":232,"column":4},"end":{"line":232,"column":23}},"48":{"start":{"line":233,"column":4},"end":{"line":233,"column":25}},"49":{"start":{"line":234,"column":4},"end":{"line":234,"column":22}},"50":{"start":{"line":235,"column":4},"end":{"line":235,"column":22}},"51":{"start":{"line":236,"column":4},"end":{"line":236,"column":22}},"52":{"start":{"line":239,"column":2},"end":{"line":250,"column":3}},"53":{"start":{"line":240,"column":4},"end":{"line":243,"column":83}},"54":{"start":{"line":245,"column":4},"end":{"line":249,"column":6}},"55":{"start":{"line":257,"column":2},"end":{"line":270,"column":4}},"56":{"start":{"line":258,"column":4},"end":{"line":261,"column":27}},"57":{"start":{"line":263,"column":4},"end":{"line":263,"column":33}},"58":{"start":{"line":265,"column":4},"end":{"line":267,"column":54}},"59":{"start":{"line":269,"column":4},"end":{"line":269,"column":16}},"60":{"start":{"line":278,"column":2},"end":{"line":295,"column":4}},"61":{"start":{"line":279,"column":4},"end":{"line":282,"column":27}},"62":{"start":{"line":284,"column":4},"end":{"line":284,"column":33}},"63":{"start":{"line":286,"column":4},"end":{"line":292,"column":7}},"64":{"start":{"line":288,"column":8},"end":{"line":288,"column":41}},"65":{"start":{"line":294,"column":4},"end":{"line":294,"column":16}},"66":{"start":{"line":303,"column":2},"end":{"line":320,"column":4}},"67":{"start":{"line":304,"column":4},"end":{"line":307,"column":27}},"68":{"start":{"line":309,"column":4},"end":{"line":309,"column":33}},"69":{"start":{"line":311,"column":4},"end":{"line":317,"column":7}},"70":{"start":{"line":313,"column":8},"end":{"line":313,"column":40}},"71":{"start":{"line":319,"column":4},"end":{"line":319,"column":16}},"72":{"start":{"line":328,"column":2},"end":{"line":330,"column":4}},"73":{"start":{"line":329,"column":4},"end":{"line":329,"column":42}},"74":{"start":{"line":339,"column":2},"end":{"line":360,"column":4}},"75":{"start":{"line":340,"column":4},"end":{"line":357,"column":5}},"76":{"start":{"line":341,"column":6},"end":{"line":341,"column":14}},"77":{"start":{"line":342,"column":6},"end":{"line":356,"column":7}},"78":{"start":{"line":344,"column":10},"end":{"line":344,"column":38}},"79":{"start":{"line":345,"column":10},"end":{"line":345,"column":38}},"80":{"start":{"line":346,"column":10},"end":{"line":346,"column":16}},"81":{"start":{"line":350,"column":10},"end":{"line":350,"column":47}},"82":{"start":{"line":351,"column":10},"end":{"line":354,"column":11}},"83":{"start":{"line":352,"column":12},"end":{"line":352,"column":44}},"84":{"start":{"line":353,"column":12},"end":{"line":353,"column":36}},"85":{"start":{"line":355,"column":10},"end":{"line":355,"column":16}},"86":{"start":{"line":359,"column":4},"end":{"line":359,"column":16}},"87":{"start":{"line":362,"column":2},"end":{"line":366,"column":4}}},"branchMap":{"1":{"line":5,"type":"if","locations":[{"start":{"line":5,"column":2},"end":{"line":5,"column":2},"skip":true},{"start":{"line":5,"column":2},"end":{"line":5,"column":2},"skip":true}]},"2":{"line":5,"type":"binary-expr","locations":[{"start":{"line":5,"column":6},"end":{"line":5,"column":32},"skip":true},{"start":{"line":5,"column":36},"end":{"line":5,"column":70},"skip":true}]},"3":{"line":7,"type":"if","locations":[{"start":{"line":7,"column":9},"end":{"line":7,"column":9},"skip":true},{"start":{"line":7,"column":9},"end":{"line":7,"column":9},"skip":true}]},"4":{"line":7,"type":"binary-expr","locations":[{"start":{"line":7,"column":13},"end":{"line":7,"column":41},"skip":true},{"start":{"line":7,"column":45},"end":{"line":7,"column":55},"skip":true}]},"5":{"line":23,"type":"if","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":4}},{"start":{"line":23,"column":4},"end":{"line":23,"column":4}}]},"6":{"line":23,"type":"binary-expr","locations":[{"start":{"line":23,"column":8},"end":{"line":23,"column":35}},{"start":{"line":23,"column":39},"end":{"line":23,"column":50}},{"start":{"line":23,"column":55},"end":{"line":23,"column":62}},{"start":{"line":23,"column":66},"end":{"line":23,"column":76}}]},"7":{"line":31,"type":"cond-expr","locations":[{"start":{"line":31,"column":33},"end":{"line":31,"column":37}},{"start":{"line":31,"column":40},"end":{"line":31,"column":67}}]},"8":{"line":35,"type":"switch","locations":[{"start":{"line":36,"column":6},"end":{"line":41,"column":10}},{"start":{"line":42,"column":6},"end":{"line":51,"column":10}},{"start":{"line":52,"column":6},"end":{"line":63,"column":10}},{"start":{"line":64,"column":6},"end":{"line":77,"column":10}},{"start":{"line":78,"column":6},"end":{"line":93,"column":10}},{"start":{"line":94,"column":6},"end":{"line":111,"column":10}},{"start":{"line":112,"column":6},"end":{"line":131,"column":10}},{"start":{"line":132,"column":6},"end":{"line":153,"column":10}},{"start":{"line":154,"column":6},"end":{"line":177,"column":10}}]},"9":{"line":38,"type":"cond-expr","locations":[{"start":{"line":39,"column":12},"end":{"line":39,"column":16}},{"start":{"line":40,"column":14},"end":{"line":40,"column":30}}]},"10":{"line":44,"type":"cond-expr","locations":[{"start":{"line":45,"column":12},"end":{"line":47,"column":13}},{"start":{"line":48,"column":14},"end":{"line":50,"column":11}}]},"11":{"line":46,"type":"cond-expr","locations":[{"start":{"line":46,"column":24},"end":{"line":46,"column":40}},{"start":{"line":46,"column":43},"end":{"line":46,"column":47}}]},"12":{"line":49,"type":"cond-expr","locations":[{"start":{"line":49,"column":22},"end":{"line":49,"column":38}},{"start":{"line":49,"column":41},"end":{"line":49,"column":45}}]},"13":{"line":54,"type":"cond-expr","locations":[{"start":{"line":55,"column":12},"end":{"line":58,"column":13}},{"start":{"line":59,"column":14},"end":{"line":62,"column":11}}]},"14":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":24},"end":{"line":56,"column":40}},{"start":{"line":56,"column":43},"end":{"line":56,"column":47}}]},"15":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":24},"end":{"line":57,"column":40}},{"start":{"line":57,"column":43},"end":{"line":57,"column":47}}]},"16":{"line":60,"type":"cond-expr","locations":[{"start":{"line":60,"column":22},"end":{"line":60,"column":38}},{"start":{"line":60,"column":41},"end":{"line":60,"column":45}}]},"17":{"line":61,"type":"cond-expr","locations":[{"start":{"line":61,"column":22},"end":{"line":61,"column":38}},{"start":{"line":61,"column":41},"end":{"line":61,"column":45}}]},"18":{"line":66,"type":"cond-expr","locations":[{"start":{"line":67,"column":12},"end":{"line":71,"column":13}},{"start":{"line":72,"column":14},"end":{"line":76,"column":11}}]},"19":{"line":68,"type":"cond-expr","locations":[{"start":{"line":68,"column":24},"end":{"line":68,"column":40}},{"start":{"line":68,"column":43},"end":{"line":68,"column":47}}]},"20":{"line":69,"type":"cond-expr","locations":[{"start":{"line":69,"column":24},"end":{"line":69,"column":40}},{"start":{"line":69,"column":43},"end":{"line":69,"column":47}}]},"21":{"line":70,"type":"cond-expr","locations":[{"start":{"line":70,"column":24},"end":{"line":70,"column":40}},{"start":{"line":70,"column":43},"end":{"line":70,"column":47}}]},"22":{"line":73,"type":"cond-expr","locations":[{"start":{"line":73,"column":22},"end":{"line":73,"column":38}},{"start":{"line":73,"column":41},"end":{"line":73,"column":45}}]},"23":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":22},"end":{"line":74,"column":38}},{"start":{"line":74,"column":41},"end":{"line":74,"column":45}}]},"24":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":22},"end":{"line":75,"column":38}},{"start":{"line":75,"column":41},"end":{"line":75,"column":45}}]},"25":{"line":80,"type":"cond-expr","locations":[{"start":{"line":81,"column":12},"end":{"line":86,"column":13}},{"start":{"line":87,"column":14},"end":{"line":92,"column":11}}]},"26":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":24},"end":{"line":82,"column":40}},{"start":{"line":82,"column":43},"end":{"line":82,"column":47}}]},"27":{"line":83,"type":"cond-expr","locations":[{"start":{"line":83,"column":24},"end":{"line":83,"column":40}},{"start":{"line":83,"column":43},"end":{"line":83,"column":47}}]},"28":{"line":84,"type":"cond-expr","locations":[{"start":{"line":84,"column":24},"end":{"line":84,"column":40}},{"start":{"line":84,"column":43},"end":{"line":84,"column":47}}]},"29":{"line":85,"type":"cond-expr","locations":[{"start":{"line":85,"column":24},"end":{"line":85,"column":40}},{"start":{"line":85,"column":43},"end":{"line":85,"column":47}}]},"30":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":22},"end":{"line":88,"column":38}},{"start":{"line":88,"column":41},"end":{"line":88,"column":45}}]},"31":{"line":89,"type":"cond-expr","locations":[{"start":{"line":89,"column":22},"end":{"line":89,"column":38}},{"start":{"line":89,"column":41},"end":{"line":89,"column":45}}]},"32":{"line":90,"type":"cond-expr","locations":[{"start":{"line":90,"column":22},"end":{"line":90,"column":38}},{"start":{"line":90,"column":41},"end":{"line":90,"column":45}}]},"33":{"line":91,"type":"cond-expr","locations":[{"start":{"line":91,"column":22},"end":{"line":91,"column":38}},{"start":{"line":91,"column":41},"end":{"line":91,"column":45}}]},"34":{"line":96,"type":"cond-expr","locations":[{"start":{"line":97,"column":12},"end":{"line":103,"column":13}},{"start":{"line":104,"column":14},"end":{"line":110,"column":11}}]},"35":{"line":98,"type":"cond-expr","locations":[{"start":{"line":98,"column":24},"end":{"line":98,"column":40}},{"start":{"line":98,"column":43},"end":{"line":98,"column":47}}]},"36":{"line":99,"type":"cond-expr","locations":[{"start":{"line":99,"column":24},"end":{"line":99,"column":40}},{"start":{"line":99,"column":43},"end":{"line":99,"column":47}}]},"37":{"line":100,"type":"cond-expr","locations":[{"start":{"line":100,"column":24},"end":{"line":100,"column":40}},{"start":{"line":100,"column":43},"end":{"line":100,"column":47}}]},"38":{"line":101,"type":"cond-expr","locations":[{"start":{"line":101,"column":24},"end":{"line":101,"column":40}},{"start":{"line":101,"column":43},"end":{"line":101,"column":47}}]},"39":{"line":102,"type":"cond-expr","locations":[{"start":{"line":102,"column":24},"end":{"line":102,"column":40}},{"start":{"line":102,"column":43},"end":{"line":102,"column":47}}]},"40":{"line":105,"type":"cond-expr","locations":[{"start":{"line":105,"column":22},"end":{"line":105,"column":38}},{"start":{"line":105,"column":41},"end":{"line":105,"column":45}}]},"41":{"line":106,"type":"cond-expr","locations":[{"start":{"line":106,"column":22},"end":{"line":106,"column":38}},{"start":{"line":106,"column":41},"end":{"line":106,"column":45}}]},"42":{"line":107,"type":"cond-expr","locations":[{"start":{"line":107,"column":22},"end":{"line":107,"column":38}},{"start":{"line":107,"column":41},"end":{"line":107,"column":45}}]},"43":{"line":108,"type":"cond-expr","locations":[{"start":{"line":108,"column":22},"end":{"line":108,"column":38}},{"start":{"line":108,"column":41},"end":{"line":108,"column":45}}]},"44":{"line":109,"type":"cond-expr","locations":[{"start":{"line":109,"column":22},"end":{"line":109,"column":38}},{"start":{"line":109,"column":41},"end":{"line":109,"column":45}}]},"45":{"line":114,"type":"cond-expr","locations":[{"start":{"line":115,"column":12},"end":{"line":122,"column":13}},{"start":{"line":123,"column":14},"end":{"line":130,"column":11}}]},"46":{"line":116,"type":"cond-expr","locations":[{"start":{"line":116,"column":24},"end":{"line":116,"column":40}},{"start":{"line":116,"column":43},"end":{"line":116,"column":47}}]},"47":{"line":117,"type":"cond-expr","locations":[{"start":{"line":117,"column":24},"end":{"line":117,"column":40}},{"start":{"line":117,"column":43},"end":{"line":117,"column":47}}]},"48":{"line":118,"type":"cond-expr","locations":[{"start":{"line":118,"column":24},"end":{"line":118,"column":40}},{"start":{"line":118,"column":43},"end":{"line":118,"column":47}}]},"49":{"line":119,"type":"cond-expr","locations":[{"start":{"line":119,"column":24},"end":{"line":119,"column":40}},{"start":{"line":119,"column":43},"end":{"line":119,"column":47}}]},"50":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":24},"end":{"line":120,"column":40}},{"start":{"line":120,"column":43},"end":{"line":120,"column":47}}]},"51":{"line":121,"type":"cond-expr","locations":[{"start":{"line":121,"column":24},"end":{"line":121,"column":40}},{"start":{"line":121,"column":43},"end":{"line":121,"column":47}}]},"52":{"line":124,"type":"cond-expr","locations":[{"start":{"line":124,"column":22},"end":{"line":124,"column":38}},{"start":{"line":124,"column":41},"end":{"line":124,"column":45}}]},"53":{"line":125,"type":"cond-expr","locations":[{"start":{"line":125,"column":22},"end":{"line":125,"column":38}},{"start":{"line":125,"column":41},"end":{"line":125,"column":45}}]},"54":{"line":126,"type":"cond-expr","locations":[{"start":{"line":126,"column":22},"end":{"line":126,"column":38}},{"start":{"line":126,"column":41},"end":{"line":126,"column":45}}]},"55":{"line":127,"type":"cond-expr","locations":[{"start":{"line":127,"column":22},"end":{"line":127,"column":38}},{"start":{"line":127,"column":41},"end":{"line":127,"column":45}}]},"56":{"line":128,"type":"cond-expr","locations":[{"start":{"line":128,"column":22},"end":{"line":128,"column":38}},{"start":{"line":128,"column":41},"end":{"line":128,"column":45}}]},"57":{"line":129,"type":"cond-expr","locations":[{"start":{"line":129,"column":22},"end":{"line":129,"column":38}},{"start":{"line":129,"column":41},"end":{"line":129,"column":45}}]},"58":{"line":134,"type":"cond-expr","locations":[{"start":{"line":135,"column":12},"end":{"line":143,"column":13}},{"start":{"line":144,"column":14},"end":{"line":152,"column":11}}]},"59":{"line":136,"type":"cond-expr","locations":[{"start":{"line":136,"column":24},"end":{"line":136,"column":40}},{"start":{"line":136,"column":43},"end":{"line":136,"column":47}}]},"60":{"line":137,"type":"cond-expr","locations":[{"start":{"line":137,"column":24},"end":{"line":137,"column":40}},{"start":{"line":137,"column":43},"end":{"line":137,"column":47}}]},"61":{"line":138,"type":"cond-expr","locations":[{"start":{"line":138,"column":24},"end":{"line":138,"column":40}},{"start":{"line":138,"column":43},"end":{"line":138,"column":47}}]},"62":{"line":139,"type":"cond-expr","locations":[{"start":{"line":139,"column":24},"end":{"line":139,"column":40}},{"start":{"line":139,"column":43},"end":{"line":139,"column":47}}]},"63":{"line":140,"type":"cond-expr","locations":[{"start":{"line":140,"column":24},"end":{"line":140,"column":40}},{"start":{"line":140,"column":43},"end":{"line":140,"column":47}}]},"64":{"line":141,"type":"cond-expr","locations":[{"start":{"line":141,"column":24},"end":{"line":141,"column":40}},{"start":{"line":141,"column":43},"end":{"line":141,"column":47}}]},"65":{"line":142,"type":"cond-expr","locations":[{"start":{"line":142,"column":24},"end":{"line":142,"column":40}},{"start":{"line":142,"column":43},"end":{"line":142,"column":47}}]},"66":{"line":145,"type":"cond-expr","locations":[{"start":{"line":145,"column":22},"end":{"line":145,"column":38}},{"start":{"line":145,"column":41},"end":{"line":145,"column":45}}]},"67":{"line":146,"type":"cond-expr","locations":[{"start":{"line":146,"column":22},"end":{"line":146,"column":38}},{"start":{"line":146,"column":41},"end":{"line":146,"column":45}}]},"68":{"line":147,"type":"cond-expr","locations":[{"start":{"line":147,"column":22},"end":{"line":147,"column":38}},{"start":{"line":147,"column":41},"end":{"line":147,"column":45}}]},"69":{"line":148,"type":"cond-expr","locations":[{"start":{"line":148,"column":22},"end":{"line":148,"column":38}},{"start":{"line":148,"column":41},"end":{"line":148,"column":45}}]},"70":{"line":149,"type":"cond-expr","locations":[{"start":{"line":149,"column":22},"end":{"line":149,"column":38}},{"start":{"line":149,"column":41},"end":{"line":149,"column":45}}]},"71":{"line":150,"type":"cond-expr","locations":[{"start":{"line":150,"column":22},"end":{"line":150,"column":38}},{"start":{"line":150,"column":41},"end":{"line":150,"column":45}}]},"72":{"line":151,"type":"cond-expr","locations":[{"start":{"line":151,"column":22},"end":{"line":151,"column":38}},{"start":{"line":151,"column":41},"end":{"line":151,"column":45}}]},"73":{"line":156,"type":"cond-expr","locations":[{"start":{"line":157,"column":12},"end":{"line":166,"column":13}},{"start":{"line":167,"column":14},"end":{"line":176,"column":11}}]},"74":{"line":158,"type":"cond-expr","locations":[{"start":{"line":158,"column":24},"end":{"line":158,"column":40}},{"start":{"line":158,"column":43},"end":{"line":158,"column":47}}]},"75":{"line":159,"type":"cond-expr","locations":[{"start":{"line":159,"column":24},"end":{"line":159,"column":40}},{"start":{"line":159,"column":43},"end":{"line":159,"column":47}}]},"76":{"line":160,"type":"cond-expr","locations":[{"start":{"line":160,"column":24},"end":{"line":160,"column":40}},{"start":{"line":160,"column":43},"end":{"line":160,"column":47}}]},"77":{"line":161,"type":"cond-expr","locations":[{"start":{"line":161,"column":24},"end":{"line":161,"column":40}},{"start":{"line":161,"column":43},"end":{"line":161,"column":47}}]},"78":{"line":162,"type":"cond-expr","locations":[{"start":{"line":162,"column":24},"end":{"line":162,"column":40}},{"start":{"line":162,"column":43},"end":{"line":162,"column":47}}]},"79":{"line":163,"type":"cond-expr","locations":[{"start":{"line":163,"column":24},"end":{"line":163,"column":40}},{"start":{"line":163,"column":43},"end":{"line":163,"column":47}}]},"80":{"line":164,"type":"cond-expr","locations":[{"start":{"line":164,"column":24},"end":{"line":164,"column":40}},{"start":{"line":164,"column":43},"end":{"line":164,"column":47}}]},"81":{"line":165,"type":"cond-expr","locations":[{"start":{"line":165,"column":24},"end":{"line":165,"column":40}},{"start":{"line":165,"column":43},"end":{"line":165,"column":47}}]},"82":{"line":168,"type":"cond-expr","locations":[{"start":{"line":168,"column":22},"end":{"line":168,"column":38}},{"start":{"line":168,"column":41},"end":{"line":168,"column":45}}]},"83":{"line":169,"type":"cond-expr","locations":[{"start":{"line":169,"column":22},"end":{"line":169,"column":38}},{"start":{"line":169,"column":41},"end":{"line":169,"column":45}}]},"84":{"line":170,"type":"cond-expr","locations":[{"start":{"line":170,"column":22},"end":{"line":170,"column":38}},{"start":{"line":170,"column":41},"end":{"line":170,"column":45}}]},"85":{"line":171,"type":"cond-expr","locations":[{"start":{"line":171,"column":22},"end":{"line":171,"column":38}},{"start":{"line":171,"column":41},"end":{"line":171,"column":45}}]},"86":{"line":172,"type":"cond-expr","locations":[{"start":{"line":172,"column":22},"end":{"line":172,"column":38}},{"start":{"line":172,"column":41},"end":{"line":172,"column":45}}]},"87":{"line":173,"type":"cond-expr","locations":[{"start":{"line":173,"column":22},"end":{"line":173,"column":38}},{"start":{"line":173,"column":41},"end":{"line":173,"column":45}}]},"88":{"line":174,"type":"cond-expr","locations":[{"start":{"line":174,"column":22},"end":{"line":174,"column":38}},{"start":{"line":174,"column":41},"end":{"line":174,"column":45}}]},"89":{"line":175,"type":"cond-expr","locations":[{"start":{"line":175,"column":22},"end":{"line":175,"column":38}},{"start":{"line":175,"column":41},"end":{"line":175,"column":45}}]},"90":{"line":195,"type":"binary-expr","locations":[{"start":{"line":195,"column":10},"end":{"line":195,"column":13}},{"start":{"line":195,"column":17},"end":{"line":195,"column":26}}]},"91":{"line":197,"type":"binary-expr","locations":[{"start":{"line":197,"column":14},"end":{"line":197,"column":21}},{"start":{"line":197,"column":25},"end":{"line":197,"column":29}}]},"92":{"line":212,"type":"binary-expr","locations":[{"start":{"line":212,"column":10},"end":{"line":212,"column":13}},{"start":{"line":212,"column":17},"end":{"line":212,"column":26}}]},"93":{"line":214,"type":"binary-expr","locations":[{"start":{"line":214,"column":14},"end":{"line":214,"column":21}},{"start":{"line":214,"column":25},"end":{"line":214,"column":29}}]},"94":{"line":229,"type":"if","locations":[{"start":{"line":229,"column":4},"end":{"line":229,"column":4}},{"start":{"line":229,"column":4},"end":{"line":229,"column":4}}]},"95":{"line":242,"type":"cond-expr","locations":[{"start":{"line":242,"column":21},"end":{"line":242,"column":70}},{"start":{"line":242,"column":74},"end":{"line":242,"column":78}}]},"96":{"line":242,"type":"cond-expr","locations":[{"start":{"line":242,"column":51},"end":{"line":242,"column":58}},{"start":{"line":242,"column":61},"end":{"line":242,"column":70}}]},"97":{"line":243,"type":"cond-expr","locations":[{"start":{"line":243,"column":21},"end":{"line":243,"column":73}},{"start":{"line":243,"column":77},"end":{"line":243,"column":82}}]},"98":{"line":243,"type":"cond-expr","locations":[{"start":{"line":243,"column":56},"end":{"line":243,"column":65}},{"start":{"line":243,"column":68},"end":{"line":243,"column":73}}]},"99":{"line":246,"type":"cond-expr","locations":[{"start":{"line":246,"column":20},"end":{"line":246,"column":29}},{"start":{"line":246,"column":32},"end":{"line":246,"column":36}}]},"100":{"line":265,"type":"cond-expr","locations":[{"start":{"line":266,"column":6},"end":{"line":266,"column":69}},{"start":{"line":267,"column":6},"end":{"line":267,"column":53}}]},"101":{"line":340,"type":"if","locations":[{"start":{"line":340,"column":4},"end":{"line":340,"column":4}},{"start":{"line":340,"column":4},"end":{"line":340,"column":4}}]},"102":{"line":342,"type":"switch","locations":[{"start":{"line":343,"column":8},"end":{"line":346,"column":16}},{"start":{"line":347,"column":8},"end":{"line":347,"column":22}},{"start":{"line":348,"column":8},"end":{"line":348,"column":22}},{"start":{"line":349,"column":8},"end":{"line":355,"column":16}}]},"103":{"line":351,"type":"if","locations":[{"start":{"line":351,"column":10},"end":{"line":351,"column":10}},{"start":{"line":351,"column":10},"end":{"line":351,"column":10}}]}}}}

@@ -30,3 +30,3 @@ (function (root, factory){

instead = function(xarg, index){
instead = function (xarg, index){
return remaining-- < 1 ? xarg : themArgs[rlen + i++] = xarg, themArgs[index];

@@ -40,3 +40,3 @@ };

return noContext ?
fn()
fn()
: fn.call(context);

@@ -47,8 +47,8 @@ };

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1
)
fn(
instead ? instead(arg1, 0) : arg1
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1
);
instead ? instead(arg1, 0) : arg1
);
};

@@ -58,10 +58,10 @@ case 2:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2
);
};

@@ -71,12 +71,12 @@ case 3:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3
);
};

@@ -86,14 +86,14 @@ case 4:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4
);
};

@@ -103,16 +103,16 @@ case 5:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5
);
};

@@ -122,18 +122,18 @@ case 6:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6
);
};

@@ -143,20 +143,20 @@ case 7:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7
);
};

@@ -166,22 +166,22 @@ case 8:

return noContext ?
fn (
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7,
instead ? instead(arg8, 7) : arg8
)
fn(
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7,
instead ? instead(arg8, 7) : arg8
)
: fn.call(context,
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7,
instead ? instead(arg8, 7) : arg8
);
instead ? instead(arg1, 0) : arg1,
instead ? instead(arg2, 1) : arg2,
instead ? instead(arg3, 2) : arg3,
instead ? instead(arg4, 3) : arg4,
instead ? instead(arg5, 4) : arg5,
instead ? instead(arg6, 5) : arg6,
instead ? instead(arg7, 6) : arg7,
instead ? instead(arg8, 7) : arg8
);
};

@@ -196,18 +196,183 @@ }

return {
wrap: function(fn, context, len){
len = len || fn.length;
/**
* Wrap a function keeping it's context or creating another
*
* @param {Function} fn Original function
* @param {*} [context] The "this" context of the newly created function
* @param {Number} [len] Number of arguments the function receives
* @returns {*}
*/
function Wrap(fn, context, len){
len = len || fn.length;
context = context || null;
context = context || null;
return template(fn, len, context);
},
predefine: function(fn, args, context, len){
len = len || fn.length;
return template(fn, len, context);
}
context = context || null;
/**
* Wraps a function in another context and predefine some arguments
*
* @param {Function} fn Original function
* @param {Array} [args] Array of arguments to prepend to the function
* @param {*} [context] The "this" context of the newly created function
* @param {Number} [len] Number of arguments the function receives
* @returns {*}
*/
function Predefine(fn, args, context, len){
len = len || fn.length;
return template(fn, len, context, args);
context = context || null;
args = Array.prototype.concat(args);
return template(fn, len, context, args);
}
/**
* Creates a new chain of delegations on the object
*
* @param {Object} proto
* @param {String} target
* @constructor
*/
function Delegate(proto, target){
if (!(this instanceof Delegate)) {
return new Delegate(proto, target);
}
this.proto = proto;
this.target = target;
this.methods = [];
this.getters = [];
this.setters = [];
}
function extract(name){
var
obj = typeof name === 'object',
_name = obj ? (typeof name.as === 'string' ? name.as : name.name) : name,
_args = obj ? (typeof name.args !== 'undefined' ? name.args : false) : false;
return {
target: obj ? name.name : name,
name: _name,
args: _args
};
}
/**
* Setup a function
*
* @param {String|Object} name Name of the function or configuration object
* @returns {Delegate}
*/
Delegate.prototype.method = function (name){
var
opts = extract(name),
proto = this.proto,
target = this.target;
this.methods.push(opts.name);
proto[opts.name] = opts.args ?
Predefine(proto[target][opts.target], opts.args, proto[target]) :
Wrap(proto[target][opts.target], proto[target]);
return this;
};
/**
* Setup a setter
*
* @param {String|Object} name Name of the function or configuration object
* @returns {Delegate}
*/
Delegate.prototype.getter = function (name){
var
opts = extract(name),
proto = this.proto,
target = this.target;
this.getters.push(opts.name);
Object.defineProperty(proto, opts.name, {
get : function (){
return this[target][opts.target];
},
enumerable : true,
configurable: true
});
return this;
};
/**
* Setup a setter
*
* @param {String|Object} name Name of the function or configuration object
* @returns {Delegate}
*/
Delegate.prototype.setter = function (name){
var
opts = extract(name),
proto = this.proto,
target = this.target;
this.setters.push(opts.name);
Object.defineProperty(proto, opts.name, {
set : function (val){
this[target][opts.target] = val;
},
enumerable : true,
configurable: true
});
return this;
};
/**
* Setup getter and setter
*
* @param {String|Object} name Name of the function or configuration object
* @returns {Delegate}
*/
Delegate.prototype.access = function (name){
return this.getter(name).setter(name);
};
/**
* Revokes a delegated method, access, setter or getter
*
* @param {String} name Name of the function
* @param {String} type Must be either method, access, setter or getter
* @returns {Delegate}
*/
Delegate.prototype.revoke = function (name, type){
if (typeof this.proto[name] !== 'undefined') {
var pos;
switch (type) {
case 'access':
this.revoke(name, 'getter');
this.revoke(name, 'setter');
break;
case 'setter':
case 'method':
case 'getter':
pos = this[type + 's'].indexOf(name);
if (pos > -1) {
this[type + 's'].splice(pos, 1);
delete this.proto[name];
}
break;
}
}
return this;
};
return {
wrap : Wrap,
predefine: Predefine,
delegate : Delegate
};
}));
{
"name": "better-curry",
"version": "1.0.0",
"description": "While Function.bind is dragging your performance down, there's always a better curry",
"version": "1.1.0",
"description": "Forget Function.bind and func.apply(context, arguments), performance matters! For a better curry!",
"main": "index.js",
"scripts": {
"test": "mocha",
"coverage": "node ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha",
"benchmark": "node test/benchmark.js"

@@ -18,3 +19,6 @@ },

"bind",
"currying"
"currying",
"partial function",
"functional",
"delegate"
],

@@ -24,3 +28,4 @@ "devDependencies": {

"expect.js": "*",
"benchmark": "^1.0.0"
"benchmark": "^1.0.0",
"delegates": "*"
},

@@ -27,0 +32,0 @@ "author": "",

[![Build Status](https://travis-ci.org/pocesar/js-bettercurry.png?branch=master)](https://travis-ci.org/pocesar/js-bettercurry?branch=master)
Better Curry
# Better Curry
=================
# WHY?
Because `return function(){ return fn.apply(context, Array.prototype.slice.call(arguments)); }` isn't good enough, that's why better curry.
Forget `Function.bind` and `func.apply(context, arguments)`, performance matters! For a better curry!
You won't find any other curry module that can achieve those benchmarks.
# Install
## Install

@@ -26,5 +26,5 @@ ```bash

# API
## API
### `BetterCurry.wrap(fn, [context], [len])`
#### `BetterCurry.wrap(fn, [context], [len])`

@@ -64,3 +64,3 @@ When the function have all arguments defined.

### `BetterCurry.predefine(fn, args, [context], [len])`
#### `BetterCurry.predefine(fn, args, [context], [len])`

@@ -93,2 +93,38 @@ Predefine creates a function that, when executed, will have the

#### `BetterCurry.delegate(proto, target)`
A minor rewrite of [visionmedia's delegates](https://github.com/visionmedia/node-delegates) but around 13% faster
```js
var obj = {
request: {
_value: 1,
function1: function(){},
get value(){
return this._value;
},
set value(val){
this._value = val;
},
}
};
var delegated = BetterCurry.delegate(obj, 'request'); //all mirror functions from obj will reflect to obj.request with the same context
delegated
.method('function1')
.access('value')
.access({name: 'value', as: 'value2'})
.method({name: 'function1', as: 'function2', args:['arg1']});
//obj is now:
obj = {
function1: function1(){/*...*/},
function2: function1(arg1){/*...*/},
value: /*..value..*/
value2: /*..value..*/
request: {/*...*/}
};
```
# Test

@@ -102,9 +138,14 @@

```bash
npm run coverage
```
Statements: 100% (41 / 41)
Branches: 100% (195 / 195)
Functions: 100% (16 / 16)
Lines: 100% (41 / 41)
Ignored: 3 statements, 5 branches
```
=============================== Coverage summary ===============================
Statements : 100% ( 87/87 ), 3 ignored
Branches : 100% ( 217/217 ), 5 ignored
Functions : 100% ( 25/25 )
Lines : 100% ( 87/87 )
================================================================================
```

@@ -111,0 +152,0 @@ # Benchmark

var
Benchmark = typeof Benchmark !== 'undefined' ? Benchmark : require('benchmark').Benchmark,
args = {bc: typeof BetterCurry !== 'undefined' ? BetterCurry : require('../index.js')},
args = {
bc: typeof BetterCurry !== 'undefined' ? BetterCurry : require('../index.js'),
delegates: typeof require === 'function' ? require('delegates') : void 0
},
setup = function (){

@@ -29,2 +32,18 @@ function Obj(){

var predefined = this.args.bc.predefine(fn, ['YES'], inObj);
var gotDelegates = typeof this.args.delegates !== 'undefined';
if (gotDelegates) {
var TJdelegated = {}, BCdelegated = {};
BCdelegated.request = {
foo: function(bar){
return bar;
}
};
TJdelegated.request = {
foo: function(bar){
return bar;
}
};
this.args.delegates(TJdelegated, 'request').method('foo');
this.args.bc.delegate(BCdelegated, 'request').method('foo');
}
},

@@ -85,4 +104,21 @@ onError = function (event){

onError: onError
})
});
if (args.delegates !== void 0) {
suite
.add('TJ delegates', {
args: args,
setup: setup,
fn: "TJdelegated.foo('YES');",
onError: onError
})
.add('BetterCurry delegates', {
args: args,
setup: setup,
fn: "BCdelegated.foo('YES');",
onError: onError
});
}
// add listeners
suite
.on('cycle', function (event){

@@ -89,0 +125,0 @@ console.log(String(event.target));

@@ -1,8 +0,11 @@

describe('BetterCurry', function(){
/*jshint evil:true */
/*globals describe:true,BetterCurry:true,it:true,before:true,expect:true */
describe('BetterCurry', function (){
'use strict';
var fn = function(arg1, arg2, arg3, arg4){
return this.data + ':' + [arg1,arg2,arg3,arg4].join(',');
var fn = function (arg1, arg2, arg3, arg4){
return this.data + ':' + [arg1, arg2, arg3, arg4].join(',');
},
fnn = function(arg1,arg2,arg3,arg4){
return [arg1,arg2,arg3,arg4].join(',');
fnn = function (arg1, arg2, arg3, arg4){
return [arg1, arg2, arg3, arg4].join(',');
},

@@ -18,6 +21,6 @@ fs = [],

function craft(i) {
function craft(i){
var out = [];
for(var x = 0; x <= i; x++) {
out.push(Math.round((Math.random()*20) + 1));
for (var x = 0; x <= i; x++) {
out.push(Math.round((Math.random() * 20) + 1));
}

@@ -27,6 +30,6 @@ return out;

before(function(){
function args(number) {
before(function (){
function args(number){
var out = [];
for(var i = 0; i <= number; i++) {
for (var i = 0; i <= number; i++) {
out.push('__arg' + i);

@@ -36,9 +39,10 @@ }

}
var i, arg;
for(i = 0; i < 9; i++) {
for (i = 0; i < 9; i++) {
arg = args(i);
fs[i] = new Function(arg.join(','), 'return this.data + ":" + (' + arg.join('+') + ');');
}
for(i = 0; i < 9; i++) {
for (i = 0; i < 9; i++) {
arg = args(i);

@@ -49,6 +53,6 @@ fns[i] = new Function(arg.join(','), 'return ' + arg.join('+') + ';');

describe('predefine', function(){
it('should bind to function context', function(){
describe('predefine', function (){
it('should bind to function context', function (){
var
args = ['predefined','arg','too'],
args = ['predefined', 'arg', 'too'],
curried = BetterCurry.predefine(fn, args, context);

@@ -59,6 +63,8 @@

it('should work on zero length functions', function(){
it('should work on zero length functions', function (){
function base(){
return this.data + (arguments.length ? arguments[0] + arguments[1] : '');
/*jshint validthis:true*/
return (this != null ? (this.data) : void 0) + (arguments.length ? arguments[0] + arguments[1] : '');
}
var curried = BetterCurry.predefine(base, [1], context);

@@ -75,5 +81,5 @@

it('should execute the function without a context', function(){
it('should execute the function without a context', function (){
var
args = ['predefined','arg','too'],
args = ['predefined', 'arg', 'too'],
curried = BetterCurry.predefine(fnn, args);

@@ -84,7 +90,7 @@

it('should pass all number of args with a context', function(){
for(var i = 1; i < fs.length; i++) {
it('should pass all number of args with a context', function (){
for (var i = 1; i < fs.length; i++) {
var args = craft(i - 1), func = BetterCurry.predefine(fs[i - 1], args, context);
expect(func.apply(null, args.concat(i))).to.be('contextData:' + (args.reduce(function(current, next){
expect(func.apply(null, args.concat(i))).to.be('contextData:' + (args.reduce(function (current, next){
return current + next;

@@ -95,7 +101,7 @@ })));

it('should pass all number of args without a context', function(){
for(var i = 1; i < fs.length; i++) {
it('should pass all number of args without a context', function (){
for (var i = 1; i < fs.length; i++) {
var args = craft(i - 1), func = BetterCurry.predefine(fns[i - 1], args);
expect(func.apply(null, args.concat(i))).to.be(args.reduce(function(current, next){
expect(func.apply(null, args.concat(i))).to.be(args.reduce(function (current, next){
return current + next;

@@ -106,20 +112,22 @@ }));

describe('should pass the examples given on readme', function(){
it('1', function(){
describe('should pass the examples given on readme', function (){
it('1', function (){
function base(argument){
return argument;
}
var based = BetterCurry.predefine(base, ['argument','will be ignored']);
var based = BetterCurry.predefine(base, ['argument', 'will be ignored']);
expect(based('this will be ignored as well')).to.be('argument');
});
it('2', function(){
it('2', function (){
function base(){
return Array.prototype.slice.call(arguments).join(' + ');
return Array.prototype.slice.call(arguments).join(' + ');
}
var curried = BetterCurry.predefine(base, ['1','2','3','4'], null, -1);
var curried = BetterCurry.predefine(base, ['1', '2', '3', '4'], null, -1);
expect(curried('5')).to.be('1 + 2 + 3 + 4 + 5');
curried = BetterCurry.predefine(base, ['1','2','3','4'], null, 5);
expect(curried('5','6')).to.be('1 + 2 + 3 + 4 + 5');
curried = BetterCurry.predefine(base, ['1', '2', '3', '4'], null, 5);
expect(curried('5', '6')).to.be('1 + 2 + 3 + 4 + 5');
});

@@ -129,4 +137,4 @@ });

describe('wrap', function(){
it('should bind to function context', function(){
describe('wrap', function (){
it('should bind to function context', function (){
var

@@ -136,6 +144,6 @@ curried = BetterCurry.wrap(fn, context);

// fn expects 4 parameters
expect(curried('arg1','arg2')).to.equal(context.data + ':' + ['arg1','arg2','',''].join(','));
expect(curried('arg1', 'arg2')).to.equal(context.data + ':' + ['arg1', 'arg2', '', ''].join(','));
});
it('should bind to function context but respect length', function(){
it('should bind to function context but respect length', function (){
var

@@ -147,3 +155,3 @@ len = 2,

expect(curried.length).to.be(len);
expect(curried('arg1','arg2','doesnt','matter')).to.equal(context.data + ':' + ['arg1','arg2','',''].join(','));
expect(curried('arg1', 'arg2', 'doesnt', 'matter')).to.equal(context.data + ':' + ['arg1', 'arg2', '', ''].join(','));

@@ -153,10 +161,10 @@ curried = BetterCurry.wrap(fn, context, len + 3);

expect(curried.length).to.be(len + 3);
expect(curried('arg1','arg2','does','matter','this doesnt')).to.equal(context.data + ':' + ['arg1','arg2','does','matter'].join(','));
expect(curried('arg1', 'arg2', 'does', 'matter', 'this doesnt')).to.equal(context.data + ':' + ['arg1', 'arg2', 'does', 'matter'].join(','));
});
it('should pass all number of args with a context', function(){
for(var i = 0; i < fs.length; i++) {
it('should pass all number of args with a context', function (){
for (var i = 0; i < fs.length; i++) {
var func = BetterCurry.wrap(fs[i], context), args = craft(i);
expect(func.apply(null, args)).to.be('contextData:' + args.reduce(function(current, next){
expect(func.apply(null, args)).to.be('contextData:' + args.reduce(function (current, next){
return current + next;

@@ -167,16 +175,18 @@ }));

describe('should pass the examples given on readme', function(){
it('1', function(){
describe('should pass the examples given on readme', function (){
it('1', function (){
function base(argument1, argument2){
return this.data + ' ' + argument1 + argument2;
/*jshint validthis:true*/
return this.data + ' ' + argument1 + argument2;
}
var based = BetterCurry.wrap(base, {data: 'hurry'});
expect(based('up','!')).to.be('hurry up!');
expect(based('up', '!')).to.be('hurry up!');
});
it('2', function(){
it('2', function (){
function base(){
return Array.prototype.slice.call(arguments).join(' + ');
}
var based = BetterCurry.wrap(base, null, 3);

@@ -186,8 +196,9 @@ expect(based('one', 'two', 'three', 'will be ignored')).to.be('one + two + three');

it('3', function(){
it('3', function (){
function base(){
return Array.prototype.slice.call(arguments).join(' + ');
return Array.prototype.slice.call(arguments).join(' + ');
}
var based = BetterCurry.wrap(base, null, -1);
expect(based('one', 'two', 'three', 'wont be ignored','its','free for all'))
expect(based('one', 'two', 'three', 'wont be ignored', 'its', 'free for all'))
.to.be('one + two + three + wont be ignored + its + free for all');

@@ -198,7 +209,7 @@

it('should pass all number of args without a context', function(){
for(var i = 0; i < fs.length; i++) {
it('should pass all number of args without a context', function (){
for (var i = 0; i < fs.length; i++) {
var func = BetterCurry.wrap(fns[i]), args = craft(i);
expect(func.apply(null, args)).to.be(args.reduce(function(current, next){
expect(func.apply(null, args)).to.be(args.reduce(function (current, next){
return current + next;

@@ -210,2 +221,166 @@ }));

});
describe('delegate', function (){
describe('.method(name)', function (){
it('should delegate methods', function (){
var obj = {};
obj.request = {
foo: function (bar){
expect(this).to.be(obj.request);
return bar;
}
};
BetterCurry.delegate(obj, 'request').method('foo');
expect(obj.foo('something')).to.equal('something');
});
it('should work with instances and functions', function(){
var obj = function(){};
obj.prototype.request =
obj.request = {
foo: function (bar){
expect(this).to.be(obj.request);
return bar;
}
};
var newobj = new obj();
BetterCurry.delegate(newobj, 'request').method('foo');
expect(newobj.foo('something')).to.equal('something');
BetterCurry.delegate(obj, 'request').method({name: 'foo', as: 'bar', args:['something']});
expect(obj.bar('fds')).to.equal('something');
});
});
describe('.getter(name)', function (){
it('should delegate getters', function (){
var obj = {};
obj.request = {
get type(){
return 'text/html';
}
};
BetterCurry.delegate(obj, 'request').getter('type');
expect(obj.type).to.equal('text/html');
});
});
describe('.setter(name)', function (){
it('should delegate setters', function (){
var obj = {};
obj.request = {
get type(){
return this._type.toUpperCase();
},
set type(val){
this._type = val;
}
};
BetterCurry.delegate(obj, 'request')
.setter('type')
.setter({name: 'type', as: 'nono'});
obj.nono = 'hey';
expect(obj.request.type).to.equal('HEY');
});
});
describe('.access(name)', function (){
it('should delegate getters and setters', function (){
var obj = {};
obj.request = {
get type(){
return this._type.toUpperCase();
},
set type(val){
this._type = val;
}
};
BetterCurry
.delegate(obj, 'request')
.access({name: 'type'});
obj.type = 'hey';
expect(obj.type).to.equal('HEY');
});
});
describe('.revoke(name, type)', function(){
it('should remove something delegated from the object', function(){
var obj = {};
obj.request = {
_me: 'truthy',
tumble: function(){
return 'tumble';
},
get me(){
return this._me;
},
set me(val) {
this._me = val;
}
};
var delegated = BetterCurry.delegate(obj, 'request');
delegated.method('tumble');
delegated.access('me');
expect(obj.tumble).to.be.a('function');
expect(obj.me).to.be.ok();
delegated.revoke('tumble', 'method');
delegated.revoke('me', 'access');
expect(obj.tumble).to.be.an('undefined');
expect(obj.me).to.be.an('undefined');
});
it('shouldnt remove something that wasnt set by delegate', function(){
var obj = {
tremble: function(){
},
set generate(val) {
var g = val;
return g;
},
get generate() {
return true;
}
};
obj.request = {
tumble: function(){
return 'tumble';
}
};
var delegated = BetterCurry.delegate(obj, 'request');
expect(obj.tremble).to.be.a('function');
expect(obj.generate).to.be.ok();
delegated.revoke('tremble', 'method');
delegated.revoke('generate', 'setter');
expect(obj.tremble).to.be.a('function');
expect(obj.generate).to.be.ok();
});
});
});
});

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc