jass-vue 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jass/vue/version.rb +1 -1
- data/lib/jass/vue.rb +1 -0
- data/vendor/node_modules/balanced-match/index.js +59 -0
- data/vendor/node_modules/balanced-match/package.json +49 -0
- data/vendor/node_modules/brace-expansion/index.js +201 -0
- data/vendor/node_modules/brace-expansion/package.json +47 -0
- data/vendor/node_modules/concat-map/index.js +13 -0
- data/vendor/node_modules/concat-map/package.json +43 -0
- data/vendor/node_modules/minimatch/minimatch.js +923 -0
- data/vendor/node_modules/minimatch/package.json +30 -0
- data/vendor/node_modules/rollup-plugin-replace/dist/rollup-plugin-replace.cjs.js +88 -0
- data/vendor/node_modules/rollup-plugin-replace/dist/rollup-plugin-replace.es.js +84 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/dist/estree-walker.es.js +57 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/dist/estree-walker.umd.js +68 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/index.d.ts +17 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/package.json +35 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/src/estree-walker.js +51 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.cjs.js +1300 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.es.js +1296 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.umd.js +1352 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/index.d.ts +83 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/package.json +55 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +302 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/dist/pluginutils.es.js +292 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/package.json +46 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/addExtension.js +6 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/attachScopes.js +155 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/createFilter.js +33 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/dataToEsm.js +69 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/index.js +5 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/makeLegalIdentifier.js +15 -0
- data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/utils/ensureArray.js +5 -0
- data/vendor/node_modules/rollup-plugin-replace/package.json +43 -0
- data/vendor/node_modules/rollup-plugin-replace/src/index.js +80 -0
- data/vendor/package.json +1 -0
- data/vendor/yarn.lock +47 -1
- metadata +36 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a8c68b940dce67edb99b7c0b63ee92a0f6224ef2418bf1c609336b7f301e8986
         | 
| 4 | 
            +
              data.tar.gz: d173ee68bc4a672b6b3027de3369da27de37c402178aae199bf7b68a7b7b2752
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f2b781f70bf27296d38bb9e14501b6b2ae05b436d2d9657ab4479cfb8ba61a3f768fcf2f7c950895160eb903c0e26a4f7e3b4066f5a25fb276e5acefebd39c1a
         | 
| 7 | 
            +
              data.tar.gz: 786241cd8d081e2586aea3514d97a27c22a6ab97401b53c5ee2c0332445502ffbe6e997ba5a1b11d717ccc7b2e3f20056dd756d8d03e9e58f523d73e9b91bd65
         | 
    
        data/lib/jass/vue/version.rb
    CHANGED
    
    
    
        data/lib/jass/vue.rb
    CHANGED
    
    
| @@ -0,0 +1,59 @@ | |
| 1 | 
            +
            'use strict';
         | 
| 2 | 
            +
            module.exports = balanced;
         | 
| 3 | 
            +
            function balanced(a, b, str) {
         | 
| 4 | 
            +
              if (a instanceof RegExp) a = maybeMatch(a, str);
         | 
| 5 | 
            +
              if (b instanceof RegExp) b = maybeMatch(b, str);
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              var r = range(a, b, str);
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              return r && {
         | 
| 10 | 
            +
                start: r[0],
         | 
| 11 | 
            +
                end: r[1],
         | 
| 12 | 
            +
                pre: str.slice(0, r[0]),
         | 
| 13 | 
            +
                body: str.slice(r[0] + a.length, r[1]),
         | 
| 14 | 
            +
                post: str.slice(r[1] + b.length)
         | 
| 15 | 
            +
              };
         | 
| 16 | 
            +
            }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            function maybeMatch(reg, str) {
         | 
| 19 | 
            +
              var m = str.match(reg);
         | 
| 20 | 
            +
              return m ? m[0] : null;
         | 
| 21 | 
            +
            }
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            balanced.range = range;
         | 
| 24 | 
            +
            function range(a, b, str) {
         | 
| 25 | 
            +
              var begs, beg, left, right, result;
         | 
| 26 | 
            +
              var ai = str.indexOf(a);
         | 
| 27 | 
            +
              var bi = str.indexOf(b, ai + 1);
         | 
| 28 | 
            +
              var i = ai;
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              if (ai >= 0 && bi > 0) {
         | 
| 31 | 
            +
                begs = [];
         | 
| 32 | 
            +
                left = str.length;
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                while (i >= 0 && !result) {
         | 
| 35 | 
            +
                  if (i == ai) {
         | 
| 36 | 
            +
                    begs.push(i);
         | 
| 37 | 
            +
                    ai = str.indexOf(a, i + 1);
         | 
| 38 | 
            +
                  } else if (begs.length == 1) {
         | 
| 39 | 
            +
                    result = [ begs.pop(), bi ];
         | 
| 40 | 
            +
                  } else {
         | 
| 41 | 
            +
                    beg = begs.pop();
         | 
| 42 | 
            +
                    if (beg < left) {
         | 
| 43 | 
            +
                      left = beg;
         | 
| 44 | 
            +
                      right = bi;
         | 
| 45 | 
            +
                    }
         | 
| 46 | 
            +
             | 
| 47 | 
            +
                    bi = str.indexOf(b, i + 1);
         | 
| 48 | 
            +
                  }
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                  i = ai < bi && ai >= 0 ? ai : bi;
         | 
| 51 | 
            +
                }
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                if (begs.length) {
         | 
| 54 | 
            +
                  result = [ left, right ];
         | 
| 55 | 
            +
                }
         | 
| 56 | 
            +
              }
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              return result;
         | 
| 59 | 
            +
            }
         | 
| @@ -0,0 +1,49 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "name": "balanced-match",
         | 
| 3 | 
            +
              "description": "Match balanced character pairs, like \"{\" and \"}\"",
         | 
| 4 | 
            +
              "version": "1.0.0",
         | 
| 5 | 
            +
              "repository": {
         | 
| 6 | 
            +
                "type": "git",
         | 
| 7 | 
            +
                "url": "git://github.com/juliangruber/balanced-match.git"
         | 
| 8 | 
            +
              },
         | 
| 9 | 
            +
              "homepage": "https://github.com/juliangruber/balanced-match",
         | 
| 10 | 
            +
              "main": "index.js",
         | 
| 11 | 
            +
              "scripts": {
         | 
| 12 | 
            +
                "test": "make test",
         | 
| 13 | 
            +
                "bench": "make bench"
         | 
| 14 | 
            +
              },
         | 
| 15 | 
            +
              "dependencies": {},
         | 
| 16 | 
            +
              "devDependencies": {
         | 
| 17 | 
            +
                "matcha": "^0.7.0",
         | 
| 18 | 
            +
                "tape": "^4.6.0"
         | 
| 19 | 
            +
              },
         | 
| 20 | 
            +
              "keywords": [
         | 
| 21 | 
            +
                "match",
         | 
| 22 | 
            +
                "regexp",
         | 
| 23 | 
            +
                "test",
         | 
| 24 | 
            +
                "balanced",
         | 
| 25 | 
            +
                "parse"
         | 
| 26 | 
            +
              ],
         | 
| 27 | 
            +
              "author": {
         | 
| 28 | 
            +
                "name": "Julian Gruber",
         | 
| 29 | 
            +
                "email": "mail@juliangruber.com",
         | 
| 30 | 
            +
                "url": "http://juliangruber.com"
         | 
| 31 | 
            +
              },
         | 
| 32 | 
            +
              "license": "MIT",
         | 
| 33 | 
            +
              "testling": {
         | 
| 34 | 
            +
                "files": "test/*.js",
         | 
| 35 | 
            +
                "browsers": [
         | 
| 36 | 
            +
                  "ie/8..latest",
         | 
| 37 | 
            +
                  "firefox/20..latest",
         | 
| 38 | 
            +
                  "firefox/nightly",
         | 
| 39 | 
            +
                  "chrome/25..latest",
         | 
| 40 | 
            +
                  "chrome/canary",
         | 
| 41 | 
            +
                  "opera/12..latest",
         | 
| 42 | 
            +
                  "opera/next",
         | 
| 43 | 
            +
                  "safari/5.1..latest",
         | 
| 44 | 
            +
                  "ipad/6.0..latest",
         | 
| 45 | 
            +
                  "iphone/6.0..latest",
         | 
| 46 | 
            +
                  "android-browser/4.2..latest"
         | 
| 47 | 
            +
                ]
         | 
| 48 | 
            +
              }
         | 
| 49 | 
            +
            }
         | 
| @@ -0,0 +1,201 @@ | |
| 1 | 
            +
            var concatMap = require('concat-map');
         | 
| 2 | 
            +
            var balanced = require('balanced-match');
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module.exports = expandTop;
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            var escSlash = '\0SLASH'+Math.random()+'\0';
         | 
| 7 | 
            +
            var escOpen = '\0OPEN'+Math.random()+'\0';
         | 
| 8 | 
            +
            var escClose = '\0CLOSE'+Math.random()+'\0';
         | 
| 9 | 
            +
            var escComma = '\0COMMA'+Math.random()+'\0';
         | 
| 10 | 
            +
            var escPeriod = '\0PERIOD'+Math.random()+'\0';
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            function numeric(str) {
         | 
| 13 | 
            +
              return parseInt(str, 10) == str
         | 
| 14 | 
            +
                ? parseInt(str, 10)
         | 
| 15 | 
            +
                : str.charCodeAt(0);
         | 
| 16 | 
            +
            }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            function escapeBraces(str) {
         | 
| 19 | 
            +
              return str.split('\\\\').join(escSlash)
         | 
| 20 | 
            +
                        .split('\\{').join(escOpen)
         | 
| 21 | 
            +
                        .split('\\}').join(escClose)
         | 
| 22 | 
            +
                        .split('\\,').join(escComma)
         | 
| 23 | 
            +
                        .split('\\.').join(escPeriod);
         | 
| 24 | 
            +
            }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            function unescapeBraces(str) {
         | 
| 27 | 
            +
              return str.split(escSlash).join('\\')
         | 
| 28 | 
            +
                        .split(escOpen).join('{')
         | 
| 29 | 
            +
                        .split(escClose).join('}')
         | 
| 30 | 
            +
                        .split(escComma).join(',')
         | 
| 31 | 
            +
                        .split(escPeriod).join('.');
         | 
| 32 | 
            +
            }
         | 
| 33 | 
            +
             | 
| 34 | 
            +
             | 
| 35 | 
            +
            // Basically just str.split(","), but handling cases
         | 
| 36 | 
            +
            // where we have nested braced sections, which should be
         | 
| 37 | 
            +
            // treated as individual members, like {a,{b,c},d}
         | 
| 38 | 
            +
            function parseCommaParts(str) {
         | 
| 39 | 
            +
              if (!str)
         | 
| 40 | 
            +
                return [''];
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              var parts = [];
         | 
| 43 | 
            +
              var m = balanced('{', '}', str);
         | 
| 44 | 
            +
             | 
| 45 | 
            +
              if (!m)
         | 
| 46 | 
            +
                return str.split(',');
         | 
| 47 | 
            +
             | 
| 48 | 
            +
              var pre = m.pre;
         | 
| 49 | 
            +
              var body = m.body;
         | 
| 50 | 
            +
              var post = m.post;
         | 
| 51 | 
            +
              var p = pre.split(',');
         | 
| 52 | 
            +
             | 
| 53 | 
            +
              p[p.length-1] += '{' + body + '}';
         | 
| 54 | 
            +
              var postParts = parseCommaParts(post);
         | 
| 55 | 
            +
              if (post.length) {
         | 
| 56 | 
            +
                p[p.length-1] += postParts.shift();
         | 
| 57 | 
            +
                p.push.apply(p, postParts);
         | 
| 58 | 
            +
              }
         | 
| 59 | 
            +
             | 
| 60 | 
            +
              parts.push.apply(parts, p);
         | 
| 61 | 
            +
             | 
| 62 | 
            +
              return parts;
         | 
| 63 | 
            +
            }
         | 
| 64 | 
            +
             | 
| 65 | 
            +
            function expandTop(str) {
         | 
| 66 | 
            +
              if (!str)
         | 
| 67 | 
            +
                return [];
         | 
| 68 | 
            +
             | 
| 69 | 
            +
              // I don't know why Bash 4.3 does this, but it does.
         | 
| 70 | 
            +
              // Anything starting with {} will have the first two bytes preserved
         | 
| 71 | 
            +
              // but *only* at the top level, so {},a}b will not expand to anything,
         | 
| 72 | 
            +
              // but a{},b}c will be expanded to [a}c,abc].
         | 
| 73 | 
            +
              // One could argue that this is a bug in Bash, but since the goal of
         | 
| 74 | 
            +
              // this module is to match Bash's rules, we escape a leading {}
         | 
| 75 | 
            +
              if (str.substr(0, 2) === '{}') {
         | 
| 76 | 
            +
                str = '\\{\\}' + str.substr(2);
         | 
| 77 | 
            +
              }
         | 
| 78 | 
            +
             | 
| 79 | 
            +
              return expand(escapeBraces(str), true).map(unescapeBraces);
         | 
| 80 | 
            +
            }
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            function identity(e) {
         | 
| 83 | 
            +
              return e;
         | 
| 84 | 
            +
            }
         | 
| 85 | 
            +
             | 
| 86 | 
            +
            function embrace(str) {
         | 
| 87 | 
            +
              return '{' + str + '}';
         | 
| 88 | 
            +
            }
         | 
| 89 | 
            +
            function isPadded(el) {
         | 
| 90 | 
            +
              return /^-?0\d/.test(el);
         | 
| 91 | 
            +
            }
         | 
| 92 | 
            +
             | 
| 93 | 
            +
            function lte(i, y) {
         | 
| 94 | 
            +
              return i <= y;
         | 
| 95 | 
            +
            }
         | 
| 96 | 
            +
            function gte(i, y) {
         | 
| 97 | 
            +
              return i >= y;
         | 
| 98 | 
            +
            }
         | 
| 99 | 
            +
             | 
| 100 | 
            +
            function expand(str, isTop) {
         | 
| 101 | 
            +
              var expansions = [];
         | 
| 102 | 
            +
             | 
| 103 | 
            +
              var m = balanced('{', '}', str);
         | 
| 104 | 
            +
              if (!m || /\$$/.test(m.pre)) return [str];
         | 
| 105 | 
            +
             | 
| 106 | 
            +
              var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
         | 
| 107 | 
            +
              var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
         | 
| 108 | 
            +
              var isSequence = isNumericSequence || isAlphaSequence;
         | 
| 109 | 
            +
              var isOptions = m.body.indexOf(',') >= 0;
         | 
| 110 | 
            +
              if (!isSequence && !isOptions) {
         | 
| 111 | 
            +
                // {a},b}
         | 
| 112 | 
            +
                if (m.post.match(/,.*\}/)) {
         | 
| 113 | 
            +
                  str = m.pre + '{' + m.body + escClose + m.post;
         | 
| 114 | 
            +
                  return expand(str);
         | 
| 115 | 
            +
                }
         | 
| 116 | 
            +
                return [str];
         | 
| 117 | 
            +
              }
         | 
| 118 | 
            +
             | 
| 119 | 
            +
              var n;
         | 
| 120 | 
            +
              if (isSequence) {
         | 
| 121 | 
            +
                n = m.body.split(/\.\./);
         | 
| 122 | 
            +
              } else {
         | 
| 123 | 
            +
                n = parseCommaParts(m.body);
         | 
| 124 | 
            +
                if (n.length === 1) {
         | 
| 125 | 
            +
                  // x{{a,b}}y ==> x{a}y x{b}y
         | 
| 126 | 
            +
                  n = expand(n[0], false).map(embrace);
         | 
| 127 | 
            +
                  if (n.length === 1) {
         | 
| 128 | 
            +
                    var post = m.post.length
         | 
| 129 | 
            +
                      ? expand(m.post, false)
         | 
| 130 | 
            +
                      : [''];
         | 
| 131 | 
            +
                    return post.map(function(p) {
         | 
| 132 | 
            +
                      return m.pre + n[0] + p;
         | 
| 133 | 
            +
                    });
         | 
| 134 | 
            +
                  }
         | 
| 135 | 
            +
                }
         | 
| 136 | 
            +
              }
         | 
| 137 | 
            +
             | 
| 138 | 
            +
              // at this point, n is the parts, and we know it's not a comma set
         | 
| 139 | 
            +
              // with a single entry.
         | 
| 140 | 
            +
             | 
| 141 | 
            +
              // no need to expand pre, since it is guaranteed to be free of brace-sets
         | 
| 142 | 
            +
              var pre = m.pre;
         | 
| 143 | 
            +
              var post = m.post.length
         | 
| 144 | 
            +
                ? expand(m.post, false)
         | 
| 145 | 
            +
                : [''];
         | 
| 146 | 
            +
             | 
| 147 | 
            +
              var N;
         | 
| 148 | 
            +
             | 
| 149 | 
            +
              if (isSequence) {
         | 
| 150 | 
            +
                var x = numeric(n[0]);
         | 
| 151 | 
            +
                var y = numeric(n[1]);
         | 
| 152 | 
            +
                var width = Math.max(n[0].length, n[1].length)
         | 
| 153 | 
            +
                var incr = n.length == 3
         | 
| 154 | 
            +
                  ? Math.abs(numeric(n[2]))
         | 
| 155 | 
            +
                  : 1;
         | 
| 156 | 
            +
                var test = lte;
         | 
| 157 | 
            +
                var reverse = y < x;
         | 
| 158 | 
            +
                if (reverse) {
         | 
| 159 | 
            +
                  incr *= -1;
         | 
| 160 | 
            +
                  test = gte;
         | 
| 161 | 
            +
                }
         | 
| 162 | 
            +
                var pad = n.some(isPadded);
         | 
| 163 | 
            +
             | 
| 164 | 
            +
                N = [];
         | 
| 165 | 
            +
             | 
| 166 | 
            +
                for (var i = x; test(i, y); i += incr) {
         | 
| 167 | 
            +
                  var c;
         | 
| 168 | 
            +
                  if (isAlphaSequence) {
         | 
| 169 | 
            +
                    c = String.fromCharCode(i);
         | 
| 170 | 
            +
                    if (c === '\\')
         | 
| 171 | 
            +
                      c = '';
         | 
| 172 | 
            +
                  } else {
         | 
| 173 | 
            +
                    c = String(i);
         | 
| 174 | 
            +
                    if (pad) {
         | 
| 175 | 
            +
                      var need = width - c.length;
         | 
| 176 | 
            +
                      if (need > 0) {
         | 
| 177 | 
            +
                        var z = new Array(need + 1).join('0');
         | 
| 178 | 
            +
                        if (i < 0)
         | 
| 179 | 
            +
                          c = '-' + z + c.slice(1);
         | 
| 180 | 
            +
                        else
         | 
| 181 | 
            +
                          c = z + c;
         | 
| 182 | 
            +
                      }
         | 
| 183 | 
            +
                    }
         | 
| 184 | 
            +
                  }
         | 
| 185 | 
            +
                  N.push(c);
         | 
| 186 | 
            +
                }
         | 
| 187 | 
            +
              } else {
         | 
| 188 | 
            +
                N = concatMap(n, function(el) { return expand(el, false) });
         | 
| 189 | 
            +
              }
         | 
| 190 | 
            +
             | 
| 191 | 
            +
              for (var j = 0; j < N.length; j++) {
         | 
| 192 | 
            +
                for (var k = 0; k < post.length; k++) {
         | 
| 193 | 
            +
                  var expansion = pre + N[j] + post[k];
         | 
| 194 | 
            +
                  if (!isTop || isSequence || expansion)
         | 
| 195 | 
            +
                    expansions.push(expansion);
         | 
| 196 | 
            +
                }
         | 
| 197 | 
            +
              }
         | 
| 198 | 
            +
             | 
| 199 | 
            +
              return expansions;
         | 
| 200 | 
            +
            }
         | 
| 201 | 
            +
             | 
| @@ -0,0 +1,47 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "name": "brace-expansion",
         | 
| 3 | 
            +
              "description": "Brace expansion as known from sh/bash",
         | 
| 4 | 
            +
              "version": "1.1.11",
         | 
| 5 | 
            +
              "repository": {
         | 
| 6 | 
            +
                "type": "git",
         | 
| 7 | 
            +
                "url": "git://github.com/juliangruber/brace-expansion.git"
         | 
| 8 | 
            +
              },
         | 
| 9 | 
            +
              "homepage": "https://github.com/juliangruber/brace-expansion",
         | 
| 10 | 
            +
              "main": "index.js",
         | 
| 11 | 
            +
              "scripts": {
         | 
| 12 | 
            +
                "test": "tape test/*.js",
         | 
| 13 | 
            +
                "gentest": "bash test/generate.sh",
         | 
| 14 | 
            +
                "bench": "matcha test/perf/bench.js"
         | 
| 15 | 
            +
              },
         | 
| 16 | 
            +
              "dependencies": {
         | 
| 17 | 
            +
                "balanced-match": "^1.0.0",
         | 
| 18 | 
            +
                "concat-map": "0.0.1"
         | 
| 19 | 
            +
              },
         | 
| 20 | 
            +
              "devDependencies": {
         | 
| 21 | 
            +
                "matcha": "^0.7.0",
         | 
| 22 | 
            +
                "tape": "^4.6.0"
         | 
| 23 | 
            +
              },
         | 
| 24 | 
            +
              "keywords": [],
         | 
| 25 | 
            +
              "author": {
         | 
| 26 | 
            +
                "name": "Julian Gruber",
         | 
| 27 | 
            +
                "email": "mail@juliangruber.com",
         | 
| 28 | 
            +
                "url": "http://juliangruber.com"
         | 
| 29 | 
            +
              },
         | 
| 30 | 
            +
              "license": "MIT",
         | 
| 31 | 
            +
              "testling": {
         | 
| 32 | 
            +
                "files": "test/*.js",
         | 
| 33 | 
            +
                "browsers": [
         | 
| 34 | 
            +
                  "ie/8..latest",
         | 
| 35 | 
            +
                  "firefox/20..latest",
         | 
| 36 | 
            +
                  "firefox/nightly",
         | 
| 37 | 
            +
                  "chrome/25..latest",
         | 
| 38 | 
            +
                  "chrome/canary",
         | 
| 39 | 
            +
                  "opera/12..latest",
         | 
| 40 | 
            +
                  "opera/next",
         | 
| 41 | 
            +
                  "safari/5.1..latest",
         | 
| 42 | 
            +
                  "ipad/6.0..latest",
         | 
| 43 | 
            +
                  "iphone/6.0..latest",
         | 
| 44 | 
            +
                  "android-browser/4.2..latest"
         | 
| 45 | 
            +
                ]
         | 
| 46 | 
            +
              }
         | 
| 47 | 
            +
            }
         | 
| @@ -0,0 +1,13 @@ | |
| 1 | 
            +
            module.exports = function (xs, fn) {
         | 
| 2 | 
            +
                var res = [];
         | 
| 3 | 
            +
                for (var i = 0; i < xs.length; i++) {
         | 
| 4 | 
            +
                    var x = fn(xs[i], i);
         | 
| 5 | 
            +
                    if (isArray(x)) res.push.apply(res, x);
         | 
| 6 | 
            +
                    else res.push(x);
         | 
| 7 | 
            +
                }
         | 
| 8 | 
            +
                return res;
         | 
| 9 | 
            +
            };
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            var isArray = Array.isArray || function (xs) {
         | 
| 12 | 
            +
                return Object.prototype.toString.call(xs) === '[object Array]';
         | 
| 13 | 
            +
            };
         | 
| @@ -0,0 +1,43 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
                "name" : "concat-map",
         | 
| 3 | 
            +
                "description" : "concatenative mapdashery",
         | 
| 4 | 
            +
                "version" : "0.0.1",
         | 
| 5 | 
            +
                "repository" : {
         | 
| 6 | 
            +
                    "type" : "git",
         | 
| 7 | 
            +
                    "url" : "git://github.com/substack/node-concat-map.git"
         | 
| 8 | 
            +
                },
         | 
| 9 | 
            +
                "main" : "index.js",
         | 
| 10 | 
            +
                "keywords" : [
         | 
| 11 | 
            +
                    "concat",
         | 
| 12 | 
            +
                    "concatMap",
         | 
| 13 | 
            +
                    "map",
         | 
| 14 | 
            +
                    "functional",
         | 
| 15 | 
            +
                    "higher-order"
         | 
| 16 | 
            +
                ],
         | 
| 17 | 
            +
                "directories" : {
         | 
| 18 | 
            +
                    "example" : "example",
         | 
| 19 | 
            +
                    "test" : "test"
         | 
| 20 | 
            +
                },
         | 
| 21 | 
            +
                "scripts" : {
         | 
| 22 | 
            +
                    "test" : "tape test/*.js"
         | 
| 23 | 
            +
                },
         | 
| 24 | 
            +
                "devDependencies" : {
         | 
| 25 | 
            +
                    "tape" : "~2.4.0"
         | 
| 26 | 
            +
                },
         | 
| 27 | 
            +
                "license" : "MIT",
         | 
| 28 | 
            +
                "author" : {
         | 
| 29 | 
            +
                    "name" : "James Halliday",
         | 
| 30 | 
            +
                    "email" : "mail@substack.net",
         | 
| 31 | 
            +
                    "url" : "http://substack.net"
         | 
| 32 | 
            +
                },
         | 
| 33 | 
            +
                "testling" : {
         | 
| 34 | 
            +
                    "files" : "test/*.js",
         | 
| 35 | 
            +
                    "browsers" : {
         | 
| 36 | 
            +
                        "ie" : [ 6, 7, 8, 9 ],
         | 
| 37 | 
            +
                        "ff" : [ 3.5, 10, 15.0 ],
         | 
| 38 | 
            +
                        "chrome" : [ 10, 22 ],
         | 
| 39 | 
            +
                        "safari" : [ 5.1 ],
         | 
| 40 | 
            +
                        "opera" : [ 12 ]
         | 
| 41 | 
            +
                    }
         | 
| 42 | 
            +
                }
         | 
| 43 | 
            +
            }
         |