jass-vue 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +43 -0
  4. data/lib/jass/vue.rb +12 -0
  5. data/lib/jass/vue/version.rb +5 -0
  6. data/vendor/node_modules/arr-diff/index.js +58 -0
  7. data/vendor/node_modules/arr-diff/package.json +49 -0
  8. data/vendor/node_modules/arr-flatten/index.js +22 -0
  9. data/vendor/node_modules/arr-flatten/package.json +76 -0
  10. data/vendor/node_modules/array-unique/index.js +28 -0
  11. data/vendor/node_modules/array-unique/package.json +37 -0
  12. data/vendor/node_modules/braces/index.js +399 -0
  13. data/vendor/node_modules/braces/package.json +83 -0
  14. data/vendor/node_modules/de-indent/index.js +45 -0
  15. data/vendor/node_modules/de-indent/package.json +25 -0
  16. data/vendor/node_modules/de-indent/test.js +30 -0
  17. data/vendor/node_modules/estree-walker/dist/estree-walker.es.js +55 -0
  18. data/vendor/node_modules/estree-walker/dist/estree-walker.es6.js +59 -0
  19. data/vendor/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
  20. data/vendor/node_modules/estree-walker/package.json +33 -0
  21. data/vendor/node_modules/estree-walker/src/estree-walker.js +49 -0
  22. data/vendor/node_modules/expand-brackets/index.js +163 -0
  23. data/vendor/node_modules/expand-brackets/package.json +62 -0
  24. data/vendor/node_modules/expand-range/index.js +43 -0
  25. data/vendor/node_modules/expand-range/package.json +73 -0
  26. data/vendor/node_modules/extglob/index.js +178 -0
  27. data/vendor/node_modules/extglob/package.json +60 -0
  28. data/vendor/node_modules/filename-regex/index.js +10 -0
  29. data/vendor/node_modules/filename-regex/package.json +50 -0
  30. data/vendor/node_modules/fill-range/index.js +408 -0
  31. data/vendor/node_modules/fill-range/package.json +61 -0
  32. data/vendor/node_modules/for-in/index.js +16 -0
  33. data/vendor/node_modules/for-in/package.json +68 -0
  34. data/vendor/node_modules/for-own/index.js +19 -0
  35. data/vendor/node_modules/for-own/package.json +70 -0
  36. data/vendor/node_modules/glob-base/index.js +51 -0
  37. data/vendor/node_modules/glob-base/package.json +52 -0
  38. data/vendor/node_modules/glob-parent/index.js +10 -0
  39. data/vendor/node_modules/glob-parent/package.json +35 -0
  40. data/vendor/node_modules/glob-parent/test.js +28 -0
  41. data/vendor/node_modules/he/bin/he +148 -0
  42. data/vendor/node_modules/he/he.js +342 -0
  43. data/vendor/node_modules/he/man/he.1 +78 -0
  44. data/vendor/node_modules/he/package.json +56 -0
  45. data/vendor/node_modules/is-buffer/index.js +21 -0
  46. data/vendor/node_modules/is-buffer/package.json +51 -0
  47. data/vendor/node_modules/is-dotfile/index.js +14 -0
  48. data/vendor/node_modules/is-dotfile/package.json +69 -0
  49. data/vendor/node_modules/is-equal-shallow/index.js +27 -0
  50. data/vendor/node_modules/is-equal-shallow/package.json +54 -0
  51. data/vendor/node_modules/is-extendable/index.js +13 -0
  52. data/vendor/node_modules/is-extendable/package.json +51 -0
  53. data/vendor/node_modules/is-extglob/index.js +11 -0
  54. data/vendor/node_modules/is-extglob/package.json +48 -0
  55. data/vendor/node_modules/is-glob/index.js +14 -0
  56. data/vendor/node_modules/is-glob/package.json +60 -0
  57. data/vendor/node_modules/is-number/index.js +19 -0
  58. data/vendor/node_modules/is-number/package.json +59 -0
  59. data/vendor/node_modules/is-posix-bracket/index.js +10 -0
  60. data/vendor/node_modules/is-posix-bracket/package.json +64 -0
  61. data/vendor/node_modules/is-primitive/index.js +13 -0
  62. data/vendor/node_modules/is-primitive/package.json +46 -0
  63. data/vendor/node_modules/isarray/index.js +5 -0
  64. data/vendor/node_modules/isarray/package.json +45 -0
  65. data/vendor/node_modules/isarray/test.js +20 -0
  66. data/vendor/node_modules/isobject/index.js +14 -0
  67. data/vendor/node_modules/isobject/package.json +67 -0
  68. data/vendor/node_modules/kind-of/index.js +116 -0
  69. data/vendor/node_modules/kind-of/package.json +90 -0
  70. data/vendor/node_modules/magic-string/dist/magic-string.cjs.js +1287 -0
  71. data/vendor/node_modules/magic-string/dist/magic-string.es.js +1283 -0
  72. data/vendor/node_modules/magic-string/dist/magic-string.umd.js +1339 -0
  73. data/vendor/node_modules/magic-string/package.json +60 -0
  74. data/vendor/node_modules/magic-string/src/Bundle.js +263 -0
  75. data/vendor/node_modules/magic-string/src/Chunk.js +154 -0
  76. data/vendor/node_modules/magic-string/src/MagicString.js +618 -0
  77. data/vendor/node_modules/magic-string/src/index-legacy.js +6 -0
  78. data/vendor/node_modules/magic-string/src/index.js +4 -0
  79. data/vendor/node_modules/magic-string/src/utils/Mappings.js +117 -0
  80. data/vendor/node_modules/magic-string/src/utils/SourceMap.js +21 -0
  81. data/vendor/node_modules/magic-string/src/utils/Stats.js +18 -0
  82. data/vendor/node_modules/magic-string/src/utils/btoa.js +13 -0
  83. data/vendor/node_modules/magic-string/src/utils/getLocator.js +35 -0
  84. data/vendor/node_modules/magic-string/src/utils/getRelativePath.js +18 -0
  85. data/vendor/node_modules/magic-string/src/utils/guessIndent.js +25 -0
  86. data/vendor/node_modules/magic-string/src/utils/hasOwnProp.js +1 -0
  87. data/vendor/node_modules/magic-string/src/utils/isObject.js +5 -0
  88. data/vendor/node_modules/micromatch/index.js +431 -0
  89. data/vendor/node_modules/micromatch/lib/chars.js +67 -0
  90. data/vendor/node_modules/micromatch/lib/expand.js +304 -0
  91. data/vendor/node_modules/micromatch/lib/glob.js +193 -0
  92. data/vendor/node_modules/micromatch/lib/utils.js +149 -0
  93. data/vendor/node_modules/micromatch/package.json +114 -0
  94. data/vendor/node_modules/normalize-path/index.js +19 -0
  95. data/vendor/node_modules/normalize-path/package.json +78 -0
  96. data/vendor/node_modules/object.omit/index.js +40 -0
  97. data/vendor/node_modules/object.omit/package.json +67 -0
  98. data/vendor/node_modules/parse-glob/index.js +156 -0
  99. data/vendor/node_modules/parse-glob/package.json +62 -0
  100. data/vendor/node_modules/preserve/index.js +54 -0
  101. data/vendor/node_modules/preserve/package.json +48 -0
  102. data/vendor/node_modules/preserve/test.js +48 -0
  103. data/vendor/node_modules/randomatic/index.js +82 -0
  104. data/vendor/node_modules/randomatic/node_modules/is-number/index.js +22 -0
  105. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/index.js +116 -0
  106. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/package.json +90 -0
  107. data/vendor/node_modules/randomatic/node_modules/is-number/package.json +83 -0
  108. data/vendor/node_modules/randomatic/node_modules/kind-of/index.js +119 -0
  109. data/vendor/node_modules/randomatic/node_modules/kind-of/package.json +90 -0
  110. data/vendor/node_modules/randomatic/package.json +78 -0
  111. data/vendor/node_modules/regex-cache/index.js +68 -0
  112. data/vendor/node_modules/regex-cache/package.json +64 -0
  113. data/vendor/node_modules/remove-trailing-separator/index.js +17 -0
  114. data/vendor/node_modules/remove-trailing-separator/package.json +37 -0
  115. data/vendor/node_modules/repeat-element/index.js +18 -0
  116. data/vendor/node_modules/repeat-element/package.json +44 -0
  117. data/vendor/node_modules/repeat-string/index.js +70 -0
  118. data/vendor/node_modules/repeat-string/package.json +77 -0
  119. data/vendor/node_modules/rollup-plugin-vue2/dist/rollup-plugin-vue2.common.js +164 -0
  120. data/vendor/node_modules/rollup-plugin-vue2/dist/rollup-plugin-vue2.es.js +160 -0
  121. data/vendor/node_modules/rollup-plugin-vue2/package.json +50 -0
  122. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +223 -0
  123. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es.js +214 -0
  124. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es6.js +217 -0
  125. data/vendor/node_modules/rollup-pluginutils/package.json +40 -0
  126. data/vendor/node_modules/rollup-pluginutils/src/addExtension.js +6 -0
  127. data/vendor/node_modules/rollup-pluginutils/src/attachScopes.js +147 -0
  128. data/vendor/node_modules/rollup-pluginutils/src/createFilter.js +33 -0
  129. data/vendor/node_modules/rollup-pluginutils/src/index.js +4 -0
  130. data/vendor/node_modules/rollup-pluginutils/src/makeLegalIdentifier.js +15 -0
  131. data/vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js +5 -0
  132. data/vendor/node_modules/vlq/dist/vlq.js +91 -0
  133. data/vendor/node_modules/vlq/package.json +27 -0
  134. data/vendor/node_modules/vlq/src/vlq.js +78 -0
  135. data/vendor/node_modules/vue-template-compiler/browser.js +5237 -0
  136. data/vendor/node_modules/vue-template-compiler/build.js +4835 -0
  137. data/vendor/node_modules/vue-template-compiler/index.js +18 -0
  138. data/vendor/node_modules/vue-template-compiler/package.json +27 -0
  139. data/vendor/node_modules/vue-template-es2015-compiler/buble.js +14112 -0
  140. data/vendor/node_modules/vue-template-es2015-compiler/index.js +24 -0
  141. data/vendor/node_modules/vue-template-es2015-compiler/package.json +28 -0
  142. data/vendor/package.json +9 -0
  143. data/vendor/yarn.lock +268 -0
  144. metadata +242 -0
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "extglob",
3
+ "description": "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.",
4
+ "version": "0.3.2",
5
+ "homepage": "https://github.com/jonschlinkert/extglob",
6
+ "author": {
7
+ "name": "Jon Schlinkert",
8
+ "url": "https://github.com/jonschlinkert"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git://github.com/jonschlinkert/extglob.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/jonschlinkert/extglob/issues"
16
+ },
17
+ "license": "MIT",
18
+ "files": [
19
+ "index.js"
20
+ ],
21
+ "main": "index.js",
22
+ "engines": {
23
+ "node": ">=0.10.0"
24
+ },
25
+ "scripts": {
26
+ "test": "mocha"
27
+ },
28
+ "dependencies": {
29
+ "is-extglob": "^1.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "ansi-green": "^0.1.1",
33
+ "micromatch": "^2.1.6",
34
+ "minimatch": "^2.0.1",
35
+ "minimist": "^1.1.0",
36
+ "mocha": "*",
37
+ "should": "*",
38
+ "success-symbol": "^0.1.0"
39
+ },
40
+ "keywords": [
41
+ "bash",
42
+ "extended",
43
+ "extglob",
44
+ "glob",
45
+ "ksh",
46
+ "match",
47
+ "wildcard"
48
+ ],
49
+ "verb": {
50
+ "related": {
51
+ "list": [
52
+ "micromatch",
53
+ "expand-brackets",
54
+ "braces",
55
+ "fill-range",
56
+ "expand-range"
57
+ ]
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * filename-regex <https://github.com/regexps/filename-regex>
3
+ *
4
+ * Copyright (c) 2014-2015, Jon Schlinkert
5
+ * Licensed under the MIT license.
6
+ */
7
+
8
+ module.exports = function filenameRegex() {
9
+ return /([^\\\/]+)$/;
10
+ };
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "filename-regex",
3
+ "description": "Regular expression for matching file names, with or without extension.",
4
+ "version": "2.0.1",
5
+ "homepage": "https://github.com/regexhq/filename-regex",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "repository": "regexhq/filename-regex",
8
+ "bugs": {
9
+ "url": "https://github.com/regexhq/filename-regex/issues"
10
+ },
11
+ "license": "MIT",
12
+ "files": [
13
+ "index.js"
14
+ ],
15
+ "main": "index.js",
16
+ "engines": {
17
+ "node": ">=0.10.0"
18
+ },
19
+ "scripts": {
20
+ "test": "mocha"
21
+ },
22
+ "keywords": [
23
+ "basename",
24
+ "file",
25
+ "filename",
26
+ "filepath",
27
+ "match",
28
+ "name",
29
+ "path",
30
+ "regex",
31
+ "regexp",
32
+ "regular expression"
33
+ ],
34
+ "devDependencies": {
35
+ "gulp-format-md": "^0.1.12"
36
+ },
37
+ "verb": {
38
+ "toc": false,
39
+ "layout": "default",
40
+ "tasks": [
41
+ "readme"
42
+ ],
43
+ "plugins": [
44
+ "gulp-format-md"
45
+ ],
46
+ "lint": {
47
+ "reflinks": true
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,408 @@
1
+ /*!
2
+ * fill-range <https://github.com/jonschlinkert/fill-range>
3
+ *
4
+ * Copyright (c) 2014-2015, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ var isObject = require('isobject');
11
+ var isNumber = require('is-number');
12
+ var randomize = require('randomatic');
13
+ var repeatStr = require('repeat-string');
14
+ var repeat = require('repeat-element');
15
+
16
+ /**
17
+ * Expose `fillRange`
18
+ */
19
+
20
+ module.exports = fillRange;
21
+
22
+ /**
23
+ * Return a range of numbers or letters.
24
+ *
25
+ * @param {String} `a` Start of the range
26
+ * @param {String} `b` End of the range
27
+ * @param {String} `step` Increment or decrement to use.
28
+ * @param {Function} `fn` Custom function to modify each element in the range.
29
+ * @return {Array}
30
+ */
31
+
32
+ function fillRange(a, b, step, options, fn) {
33
+ if (a == null || b == null) {
34
+ throw new Error('fill-range expects the first and second args to be strings.');
35
+ }
36
+
37
+ if (typeof step === 'function') {
38
+ fn = step; options = {}; step = null;
39
+ }
40
+
41
+ if (typeof options === 'function') {
42
+ fn = options; options = {};
43
+ }
44
+
45
+ if (isObject(step)) {
46
+ options = step; step = '';
47
+ }
48
+
49
+ var expand, regex = false, sep = '';
50
+ var opts = options || {};
51
+
52
+ if (typeof opts.silent === 'undefined') {
53
+ opts.silent = true;
54
+ }
55
+
56
+ step = step || opts.step;
57
+
58
+ // store a ref to unmodified arg
59
+ var origA = a, origB = b;
60
+
61
+ b = (b.toString() === '-0') ? 0 : b;
62
+
63
+ if (opts.optimize || opts.makeRe) {
64
+ step = step ? (step += '~') : step;
65
+ expand = true;
66
+ regex = true;
67
+ sep = '~';
68
+ }
69
+
70
+ // handle special step characters
71
+ if (typeof step === 'string') {
72
+ var match = stepRe().exec(step);
73
+
74
+ if (match) {
75
+ var i = match.index;
76
+ var m = match[0];
77
+
78
+ // repeat string
79
+ if (m === '+') {
80
+ return repeat(a, b);
81
+
82
+ // randomize a, `b` times
83
+ } else if (m === '?') {
84
+ return [randomize(a, b)];
85
+
86
+ // expand right, no regex reduction
87
+ } else if (m === '>') {
88
+ step = step.substr(0, i) + step.substr(i + 1);
89
+ expand = true;
90
+
91
+ // expand to an array, or if valid create a reduced
92
+ // string for a regex logic `or`
93
+ } else if (m === '|') {
94
+ step = step.substr(0, i) + step.substr(i + 1);
95
+ expand = true;
96
+ regex = true;
97
+ sep = m;
98
+
99
+ // expand to an array, or if valid create a reduced
100
+ // string for a regex range
101
+ } else if (m === '~') {
102
+ step = step.substr(0, i) + step.substr(i + 1);
103
+ expand = true;
104
+ regex = true;
105
+ sep = m;
106
+ }
107
+ } else if (!isNumber(step)) {
108
+ if (!opts.silent) {
109
+ throw new TypeError('fill-range: invalid step.');
110
+ }
111
+ return null;
112
+ }
113
+ }
114
+
115
+ if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) {
116
+ if (!opts.silent) {
117
+ throw new RangeError('fill-range: invalid range arguments.');
118
+ }
119
+ return null;
120
+ }
121
+
122
+ // has neither a letter nor number, or has both letters and numbers
123
+ // this needs to be after the step logic
124
+ if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) {
125
+ if (!opts.silent) {
126
+ throw new RangeError('fill-range: invalid range arguments.');
127
+ }
128
+ return null;
129
+ }
130
+
131
+ // validate arguments
132
+ var isNumA = isNumber(zeros(a));
133
+ var isNumB = isNumber(zeros(b));
134
+
135
+ if ((!isNumA && isNumB) || (isNumA && !isNumB)) {
136
+ if (!opts.silent) {
137
+ throw new TypeError('fill-range: first range argument is incompatible with second.');
138
+ }
139
+ return null;
140
+ }
141
+
142
+ // by this point both are the same, so we
143
+ // can use A to check going forward.
144
+ var isNum = isNumA;
145
+ var num = formatStep(step);
146
+
147
+ // is the range alphabetical? or numeric?
148
+ if (isNum) {
149
+ // if numeric, coerce to an integer
150
+ a = +a; b = +b;
151
+ } else {
152
+ // otherwise, get the charCode to expand alpha ranges
153
+ a = a.charCodeAt(0);
154
+ b = b.charCodeAt(0);
155
+ }
156
+
157
+ // is the pattern descending?
158
+ var isDescending = a > b;
159
+
160
+ // don't create a character class if the args are < 0
161
+ if (a < 0 || b < 0) {
162
+ expand = false;
163
+ regex = false;
164
+ }
165
+
166
+ // detect padding
167
+ var padding = isPadded(origA, origB);
168
+ var res, pad, arr = [];
169
+ var ii = 0;
170
+
171
+ // character classes, ranges and logical `or`
172
+ if (regex) {
173
+ if (shouldExpand(a, b, num, isNum, padding, opts)) {
174
+ // make sure the correct separator is used
175
+ if (sep === '|' || sep === '~') {
176
+ sep = detectSeparator(a, b, num, isNum, isDescending);
177
+ }
178
+ return wrap([origA, origB], sep, opts);
179
+ }
180
+ }
181
+
182
+ while (isDescending ? (a >= b) : (a <= b)) {
183
+ if (padding && isNum) {
184
+ pad = padding(a);
185
+ }
186
+
187
+ // custom function
188
+ if (typeof fn === 'function') {
189
+ res = fn(a, isNum, pad, ii++);
190
+
191
+ // letters
192
+ } else if (!isNum) {
193
+ if (regex && isInvalidChar(a)) {
194
+ res = null;
195
+ } else {
196
+ res = String.fromCharCode(a);
197
+ }
198
+
199
+ // numbers
200
+ } else {
201
+ res = formatPadding(a, pad);
202
+ }
203
+
204
+ // add result to the array, filtering any nulled values
205
+ if (res !== null) arr.push(res);
206
+
207
+ // increment or decrement
208
+ if (isDescending) {
209
+ a -= num;
210
+ } else {
211
+ a += num;
212
+ }
213
+ }
214
+
215
+ // now that the array is expanded, we need to handle regex
216
+ // character classes, ranges or logical `or` that wasn't
217
+ // already handled before the loop
218
+ if ((regex || expand) && !opts.noexpand) {
219
+ // make sure the correct separator is used
220
+ if (sep === '|' || sep === '~') {
221
+ sep = detectSeparator(a, b, num, isNum, isDescending);
222
+ }
223
+ if (arr.length === 1 || a < 0 || b < 0) { return arr; }
224
+ return wrap(arr, sep, opts);
225
+ }
226
+
227
+ return arr;
228
+ }
229
+
230
+ /**
231
+ * Wrap the string with the correct regex
232
+ * syntax.
233
+ */
234
+
235
+ function wrap(arr, sep, opts) {
236
+ if (sep === '~') { sep = '-'; }
237
+ var str = arr.join(sep);
238
+ var pre = opts && opts.regexPrefix;
239
+
240
+ // regex logical `or`
241
+ if (sep === '|') {
242
+ str = pre ? pre + str : str;
243
+ str = '(' + str + ')';
244
+ }
245
+
246
+ // regex character class
247
+ if (sep === '-') {
248
+ str = (pre && pre === '^')
249
+ ? pre + str
250
+ : str;
251
+ str = '[' + str + ']';
252
+ }
253
+ return [str];
254
+ }
255
+
256
+ /**
257
+ * Check for invalid characters
258
+ */
259
+
260
+ function isCharClass(a, b, step, isNum, isDescending) {
261
+ if (isDescending) { return false; }
262
+ if (isNum) { return a <= 9 && b <= 9; }
263
+ if (a < b) { return step === 1; }
264
+ return false;
265
+ }
266
+
267
+ /**
268
+ * Detect the correct separator to use
269
+ */
270
+
271
+ function shouldExpand(a, b, num, isNum, padding, opts) {
272
+ if (isNum && (a > 9 || b > 9)) { return false; }
273
+ return !padding && num === 1 && a < b;
274
+ }
275
+
276
+ /**
277
+ * Detect the correct separator to use
278
+ */
279
+
280
+ function detectSeparator(a, b, step, isNum, isDescending) {
281
+ var isChar = isCharClass(a, b, step, isNum, isDescending);
282
+ if (!isChar) {
283
+ return '|';
284
+ }
285
+ return '~';
286
+ }
287
+
288
+ /**
289
+ * Correctly format the step based on type
290
+ */
291
+
292
+ function formatStep(step) {
293
+ return Math.abs(step >> 0) || 1;
294
+ }
295
+
296
+ /**
297
+ * Format padding, taking leading `-` into account
298
+ */
299
+
300
+ function formatPadding(ch, pad) {
301
+ var res = pad ? pad + ch : ch;
302
+ if (pad && ch.toString().charAt(0) === '-') {
303
+ res = '-' + pad + ch.toString().substr(1);
304
+ }
305
+ return res.toString();
306
+ }
307
+
308
+ /**
309
+ * Check for invalid characters
310
+ */
311
+
312
+ function isInvalidChar(str) {
313
+ var ch = toStr(str);
314
+ return ch === '\\'
315
+ || ch === '['
316
+ || ch === ']'
317
+ || ch === '^'
318
+ || ch === '('
319
+ || ch === ')'
320
+ || ch === '`';
321
+ }
322
+
323
+ /**
324
+ * Convert to a string from a charCode
325
+ */
326
+
327
+ function toStr(ch) {
328
+ return String.fromCharCode(ch);
329
+ }
330
+
331
+
332
+ /**
333
+ * Step regex
334
+ */
335
+
336
+ function stepRe() {
337
+ return /\?|>|\||\+|\~/g;
338
+ }
339
+
340
+ /**
341
+ * Return true if `val` has either a letter
342
+ * or a number
343
+ */
344
+
345
+ function noAlphaNum(val) {
346
+ return /[a-z0-9]/i.test(val);
347
+ }
348
+
349
+ /**
350
+ * Return true if `val` has both a letter and
351
+ * a number (invalid)
352
+ */
353
+
354
+ function hasBoth(val) {
355
+ return /[a-z][0-9]|[0-9][a-z]/i.test(val);
356
+ }
357
+
358
+ /**
359
+ * Normalize zeros for checks
360
+ */
361
+
362
+ function zeros(val) {
363
+ if (/^-*0+$/.test(val.toString())) {
364
+ return '0';
365
+ }
366
+ return val;
367
+ }
368
+
369
+ /**
370
+ * Return true if `val` has leading zeros,
371
+ * or a similar valid pattern.
372
+ */
373
+
374
+ function hasZeros(val) {
375
+ return /[^.]\.|^-*0+[0-9]/.test(val);
376
+ }
377
+
378
+ /**
379
+ * If the string is padded, returns a curried function with
380
+ * the a cached padding string, or `false` if no padding.
381
+ *
382
+ * @param {*} `origA` String or number.
383
+ * @return {String|Boolean}
384
+ */
385
+
386
+ function isPadded(origA, origB) {
387
+ if (hasZeros(origA) || hasZeros(origB)) {
388
+ var alen = length(origA);
389
+ var blen = length(origB);
390
+
391
+ var len = alen >= blen
392
+ ? alen
393
+ : blen;
394
+
395
+ return function (a) {
396
+ return repeatStr('0', len - length(a));
397
+ };
398
+ }
399
+ return false;
400
+ }
401
+
402
+ /**
403
+ * Get the string length of `val`
404
+ */
405
+
406
+ function length(val) {
407
+ return val.toString().length;
408
+ }