protobufjs 6.10.2 → 6.11.2

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.
Files changed (220) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/bin/pbjs +0 -0
  3. package/bin/pbts +0 -0
  4. package/cli/README.md +163 -0
  5. package/cli/node_modules/.package-lock.json +256 -0
  6. package/cli/node_modules/acorn/CHANGELOG.md +620 -0
  7. package/cli/node_modules/acorn/LICENSE +21 -0
  8. package/cli/node_modules/acorn/README.md +269 -0
  9. package/cli/node_modules/acorn/bin/acorn +4 -0
  10. package/cli/node_modules/acorn/dist/acorn.d.ts +209 -0
  11. package/cli/node_modules/acorn/dist/acorn.js +5186 -0
  12. package/cli/node_modules/acorn/dist/acorn.js.map +1 -0
  13. package/cli/node_modules/acorn/dist/acorn.mjs +5155 -0
  14. package/cli/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  15. package/cli/node_modules/acorn/dist/acorn.mjs.map +1 -0
  16. package/cli/node_modules/acorn/dist/bin.js +64 -0
  17. package/cli/node_modules/acorn/package.json +35 -0
  18. package/cli/node_modules/acorn-jsx/LICENSE +19 -0
  19. package/cli/node_modules/acorn-jsx/README.md +40 -0
  20. package/cli/node_modules/acorn-jsx/index.js +488 -0
  21. package/cli/node_modules/acorn-jsx/package.json +27 -0
  22. package/cli/node_modules/acorn-jsx/xhtml.js +255 -0
  23. package/cli/node_modules/balanced-match/.npmignore +5 -0
  24. package/cli/node_modules/balanced-match/LICENSE.md +21 -0
  25. package/cli/node_modules/balanced-match/README.md +91 -0
  26. package/cli/node_modules/balanced-match/index.js +59 -0
  27. package/cli/node_modules/balanced-match/package.json +49 -0
  28. package/cli/node_modules/brace-expansion/LICENSE +21 -0
  29. package/cli/node_modules/brace-expansion/README.md +129 -0
  30. package/cli/node_modules/brace-expansion/index.js +201 -0
  31. package/cli/node_modules/brace-expansion/package.json +47 -0
  32. package/cli/node_modules/concat-map/.travis.yml +4 -0
  33. package/cli/node_modules/concat-map/LICENSE +18 -0
  34. package/cli/node_modules/concat-map/README.markdown +62 -0
  35. package/cli/node_modules/concat-map/example/map.js +6 -0
  36. package/cli/node_modules/concat-map/index.js +13 -0
  37. package/cli/node_modules/concat-map/package.json +43 -0
  38. package/cli/node_modules/concat-map/test/map.js +39 -0
  39. package/cli/node_modules/deep-is/.npmignore +1 -0
  40. package/cli/node_modules/deep-is/.travis.yml +6 -0
  41. package/cli/node_modules/deep-is/LICENSE +22 -0
  42. package/cli/node_modules/deep-is/README.markdown +70 -0
  43. package/cli/node_modules/deep-is/example/cmp.js +11 -0
  44. package/cli/node_modules/deep-is/index.js +102 -0
  45. package/cli/node_modules/deep-is/package.json +61 -0
  46. package/cli/node_modules/deep-is/test/NaN.js +16 -0
  47. package/cli/node_modules/deep-is/test/cmp.js +23 -0
  48. package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
  49. package/cli/node_modules/escodegen/LICENSE.BSD +21 -0
  50. package/cli/node_modules/escodegen/README.md +84 -0
  51. package/cli/node_modules/escodegen/bin/escodegen.js +77 -0
  52. package/cli/node_modules/escodegen/bin/esgenerate.js +64 -0
  53. package/cli/node_modules/escodegen/escodegen.js +2647 -0
  54. package/cli/node_modules/escodegen/package.json +62 -0
  55. package/cli/node_modules/eslint-visitor-keys/CHANGELOG.md +25 -0
  56. package/cli/node_modules/eslint-visitor-keys/LICENSE +201 -0
  57. package/cli/node_modules/eslint-visitor-keys/README.md +98 -0
  58. package/cli/node_modules/eslint-visitor-keys/lib/index.js +81 -0
  59. package/cli/node_modules/eslint-visitor-keys/lib/visitor-keys.json +284 -0
  60. package/cli/node_modules/eslint-visitor-keys/package.json +40 -0
  61. package/cli/node_modules/espree/CHANGELOG.md +509 -0
  62. package/cli/node_modules/espree/LICENSE +25 -0
  63. package/cli/node_modules/espree/README.md +233 -0
  64. package/cli/node_modules/espree/espree.js +177 -0
  65. package/cli/node_modules/espree/lib/ast-node-types.js +96 -0
  66. package/cli/node_modules/espree/lib/espree.js +286 -0
  67. package/cli/node_modules/espree/lib/features.js +29 -0
  68. package/cli/node_modules/espree/lib/options.js +106 -0
  69. package/cli/node_modules/espree/lib/token-translator.js +263 -0
  70. package/cli/node_modules/espree/lib/visitor-keys.js +123 -0
  71. package/cli/node_modules/espree/package.json +64 -0
  72. package/cli/node_modules/esprima/ChangeLog +235 -0
  73. package/cli/node_modules/esprima/LICENSE.BSD +21 -0
  74. package/cli/node_modules/esprima/README.md +46 -0
  75. package/cli/node_modules/esprima/bin/esparse.js +139 -0
  76. package/cli/node_modules/esprima/bin/esvalidate.js +236 -0
  77. package/cli/node_modules/esprima/dist/esprima.js +6709 -0
  78. package/cli/node_modules/esprima/package.json +112 -0
  79. package/cli/node_modules/estraverse/.jshintrc +16 -0
  80. package/cli/node_modules/estraverse/LICENSE.BSD +19 -0
  81. package/cli/node_modules/estraverse/README.md +153 -0
  82. package/cli/node_modules/estraverse/estraverse.js +801 -0
  83. package/cli/node_modules/estraverse/gulpfile.js +70 -0
  84. package/cli/node_modules/estraverse/package.json +40 -0
  85. package/cli/node_modules/esutils/LICENSE.BSD +19 -0
  86. package/cli/node_modules/esutils/README.md +174 -0
  87. package/cli/node_modules/esutils/lib/ast.js +144 -0
  88. package/cli/node_modules/esutils/lib/code.js +135 -0
  89. package/cli/node_modules/esutils/lib/keyword.js +165 -0
  90. package/cli/node_modules/esutils/lib/utils.js +33 -0
  91. package/cli/node_modules/esutils/package.json +44 -0
  92. package/cli/node_modules/fast-levenshtein/LICENSE.md +25 -0
  93. package/cli/node_modules/fast-levenshtein/README.md +104 -0
  94. package/cli/node_modules/fast-levenshtein/levenshtein.js +136 -0
  95. package/cli/node_modules/fast-levenshtein/package.json +39 -0
  96. package/cli/node_modules/fs.realpath/LICENSE +43 -0
  97. package/cli/node_modules/fs.realpath/README.md +33 -0
  98. package/cli/node_modules/fs.realpath/index.js +66 -0
  99. package/cli/node_modules/fs.realpath/old.js +303 -0
  100. package/cli/node_modules/fs.realpath/package.json +26 -0
  101. package/cli/node_modules/glob/LICENSE +21 -0
  102. package/cli/node_modules/glob/README.md +375 -0
  103. package/cli/node_modules/glob/changelog.md +67 -0
  104. package/cli/node_modules/glob/common.js +240 -0
  105. package/cli/node_modules/glob/glob.js +790 -0
  106. package/cli/node_modules/glob/package.json +46 -0
  107. package/cli/node_modules/glob/sync.js +486 -0
  108. package/cli/node_modules/inflight/LICENSE +15 -0
  109. package/cli/node_modules/inflight/README.md +37 -0
  110. package/cli/node_modules/inflight/inflight.js +54 -0
  111. package/cli/node_modules/inflight/package.json +29 -0
  112. package/cli/node_modules/inherits/LICENSE +16 -0
  113. package/cli/node_modules/inherits/README.md +42 -0
  114. package/cli/node_modules/inherits/inherits.js +9 -0
  115. package/cli/node_modules/inherits/inherits_browser.js +27 -0
  116. package/cli/node_modules/inherits/package.json +29 -0
  117. package/cli/node_modules/levn/LICENSE +22 -0
  118. package/cli/node_modules/levn/README.md +196 -0
  119. package/cli/node_modules/levn/lib/cast.js +298 -0
  120. package/cli/node_modules/levn/lib/coerce.js +285 -0
  121. package/cli/node_modules/levn/lib/index.js +22 -0
  122. package/cli/node_modules/levn/lib/parse-string.js +113 -0
  123. package/cli/node_modules/levn/lib/parse.js +102 -0
  124. package/cli/node_modules/levn/package.json +47 -0
  125. package/cli/node_modules/minimatch/LICENSE +15 -0
  126. package/cli/node_modules/minimatch/README.md +209 -0
  127. package/cli/node_modules/minimatch/minimatch.js +923 -0
  128. package/cli/node_modules/minimatch/package.json +30 -0
  129. package/cli/node_modules/once/LICENSE +15 -0
  130. package/cli/node_modules/once/README.md +79 -0
  131. package/cli/node_modules/once/once.js +42 -0
  132. package/cli/node_modules/once/package.json +33 -0
  133. package/cli/node_modules/optionator/CHANGELOG.md +56 -0
  134. package/cli/node_modules/optionator/LICENSE +22 -0
  135. package/cli/node_modules/optionator/README.md +238 -0
  136. package/cli/node_modules/optionator/lib/help.js +260 -0
  137. package/cli/node_modules/optionator/lib/index.js +465 -0
  138. package/cli/node_modules/optionator/lib/util.js +54 -0
  139. package/cli/node_modules/optionator/package.json +44 -0
  140. package/cli/node_modules/path-is-absolute/index.js +20 -0
  141. package/cli/node_modules/path-is-absolute/license +21 -0
  142. package/cli/node_modules/path-is-absolute/package.json +43 -0
  143. package/cli/node_modules/path-is-absolute/readme.md +59 -0
  144. package/cli/node_modules/prelude-ls/CHANGELOG.md +99 -0
  145. package/cli/node_modules/prelude-ls/LICENSE +22 -0
  146. package/cli/node_modules/prelude-ls/README.md +15 -0
  147. package/cli/node_modules/prelude-ls/lib/Func.js +65 -0
  148. package/cli/node_modules/prelude-ls/lib/List.js +686 -0
  149. package/cli/node_modules/prelude-ls/lib/Num.js +130 -0
  150. package/cli/node_modules/prelude-ls/lib/Obj.js +154 -0
  151. package/cli/node_modules/prelude-ls/lib/Str.js +92 -0
  152. package/cli/node_modules/prelude-ls/lib/index.js +178 -0
  153. package/cli/node_modules/prelude-ls/package.json +52 -0
  154. package/cli/node_modules/rimraf/CHANGELOG.md +65 -0
  155. package/cli/node_modules/rimraf/LICENSE +15 -0
  156. package/cli/node_modules/rimraf/README.md +101 -0
  157. package/cli/node_modules/rimraf/bin.js +68 -0
  158. package/cli/node_modules/rimraf/package.json +32 -0
  159. package/cli/node_modules/rimraf/rimraf.js +360 -0
  160. package/cli/node_modules/source-map/CHANGELOG.md +301 -0
  161. package/cli/node_modules/source-map/LICENSE +28 -0
  162. package/cli/node_modules/source-map/README.md +742 -0
  163. package/cli/node_modules/source-map/dist/source-map.debug.js +3234 -0
  164. package/cli/node_modules/source-map/dist/source-map.js +3233 -0
  165. package/cli/node_modules/source-map/dist/source-map.min.js +2 -0
  166. package/cli/node_modules/source-map/dist/source-map.min.js.map +1 -0
  167. package/cli/node_modules/source-map/lib/array-set.js +121 -0
  168. package/cli/node_modules/source-map/lib/base64-vlq.js +140 -0
  169. package/cli/node_modules/source-map/lib/base64.js +67 -0
  170. package/cli/node_modules/source-map/lib/binary-search.js +111 -0
  171. package/cli/node_modules/source-map/lib/mapping-list.js +79 -0
  172. package/cli/node_modules/source-map/lib/quick-sort.js +114 -0
  173. package/cli/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  174. package/cli/node_modules/source-map/lib/source-map-generator.js +425 -0
  175. package/cli/node_modules/source-map/lib/source-node.js +413 -0
  176. package/cli/node_modules/source-map/lib/util.js +488 -0
  177. package/cli/node_modules/source-map/package.json +73 -0
  178. package/cli/node_modules/source-map/source-map.d.ts +98 -0
  179. package/cli/node_modules/source-map/source-map.js +8 -0
  180. package/cli/node_modules/tmp/CHANGELOG.md +288 -0
  181. package/cli/node_modules/tmp/LICENSE +21 -0
  182. package/cli/node_modules/tmp/README.md +365 -0
  183. package/cli/node_modules/tmp/lib/tmp.js +780 -0
  184. package/cli/node_modules/tmp/package.json +58 -0
  185. package/cli/node_modules/type-check/LICENSE +22 -0
  186. package/cli/node_modules/type-check/README.md +210 -0
  187. package/cli/node_modules/type-check/lib/check.js +126 -0
  188. package/cli/node_modules/type-check/lib/index.js +16 -0
  189. package/cli/node_modules/type-check/lib/parse-type.js +196 -0
  190. package/cli/node_modules/type-check/package.json +40 -0
  191. package/cli/node_modules/word-wrap/LICENSE +21 -0
  192. package/cli/node_modules/word-wrap/README.md +182 -0
  193. package/cli/node_modules/word-wrap/index.d.ts +50 -0
  194. package/cli/node_modules/word-wrap/index.js +46 -0
  195. package/cli/node_modules/word-wrap/package.json +77 -0
  196. package/cli/node_modules/wrappy/LICENSE +15 -0
  197. package/cli/node_modules/wrappy/README.md +36 -0
  198. package/cli/node_modules/wrappy/package.json +29 -0
  199. package/cli/node_modules/wrappy/wrappy.js +33 -0
  200. package/cli/package.json +1 -0
  201. package/cli/pbjs.js +3 -1
  202. package/cli/targets/static.js +7 -1
  203. package/dist/light/protobuf.js +17 -5
  204. package/dist/light/protobuf.js.map +1 -1
  205. package/dist/light/protobuf.min.js +3 -3
  206. package/dist/light/protobuf.min.js.map +1 -1
  207. package/dist/minimal/protobuf.js +2 -2
  208. package/dist/minimal/protobuf.min.js +3 -3
  209. package/dist/minimal/protobuf.min.js.map +1 -1
  210. package/dist/protobuf.js +54 -9
  211. package/dist/protobuf.js.map +1 -1
  212. package/dist/protobuf.min.js +3 -3
  213. package/dist/protobuf.min.js.map +1 -1
  214. package/index.d.ts +11 -1
  215. package/package.json +2 -2
  216. package/src/field.js +3 -0
  217. package/src/namespace.js +2 -1
  218. package/src/parse.js +37 -4
  219. package/package-lock.json +0 -8922
  220. package/scripts/changelog.js +0 -150
@@ -0,0 +1,130 @@
1
+ // Generated by LiveScript 1.4.0
2
+ var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
3
+ max = curry$(function(x$, y$){
4
+ return x$ > y$ ? x$ : y$;
5
+ });
6
+ min = curry$(function(x$, y$){
7
+ return x$ < y$ ? x$ : y$;
8
+ });
9
+ negate = function(x){
10
+ return -x;
11
+ };
12
+ abs = Math.abs;
13
+ signum = function(x){
14
+ if (x < 0) {
15
+ return -1;
16
+ } else if (x > 0) {
17
+ return 1;
18
+ } else {
19
+ return 0;
20
+ }
21
+ };
22
+ quot = curry$(function(x, y){
23
+ return ~~(x / y);
24
+ });
25
+ rem = curry$(function(x$, y$){
26
+ return x$ % y$;
27
+ });
28
+ div = curry$(function(x, y){
29
+ return Math.floor(x / y);
30
+ });
31
+ mod = curry$(function(x$, y$){
32
+ var ref$;
33
+ return (((x$) % (ref$ = y$) + ref$) % ref$);
34
+ });
35
+ recip = (function(it){
36
+ return 1 / it;
37
+ });
38
+ pi = Math.PI;
39
+ tau = pi * 2;
40
+ exp = Math.exp;
41
+ sqrt = Math.sqrt;
42
+ ln = Math.log;
43
+ pow = curry$(function(x$, y$){
44
+ return Math.pow(x$, y$);
45
+ });
46
+ sin = Math.sin;
47
+ tan = Math.tan;
48
+ cos = Math.cos;
49
+ asin = Math.asin;
50
+ acos = Math.acos;
51
+ atan = Math.atan;
52
+ atan2 = curry$(function(x, y){
53
+ return Math.atan2(x, y);
54
+ });
55
+ truncate = function(x){
56
+ return ~~x;
57
+ };
58
+ round = Math.round;
59
+ ceiling = Math.ceil;
60
+ floor = Math.floor;
61
+ isItNaN = function(x){
62
+ return x !== x;
63
+ };
64
+ even = function(x){
65
+ return x % 2 === 0;
66
+ };
67
+ odd = function(x){
68
+ return x % 2 !== 0;
69
+ };
70
+ gcd = curry$(function(x, y){
71
+ var z;
72
+ x = Math.abs(x);
73
+ y = Math.abs(y);
74
+ while (y !== 0) {
75
+ z = x % y;
76
+ x = y;
77
+ y = z;
78
+ }
79
+ return x;
80
+ });
81
+ lcm = curry$(function(x, y){
82
+ return Math.abs(Math.floor(x / gcd(x, y) * y));
83
+ });
84
+ module.exports = {
85
+ max: max,
86
+ min: min,
87
+ negate: negate,
88
+ abs: abs,
89
+ signum: signum,
90
+ quot: quot,
91
+ rem: rem,
92
+ div: div,
93
+ mod: mod,
94
+ recip: recip,
95
+ pi: pi,
96
+ tau: tau,
97
+ exp: exp,
98
+ sqrt: sqrt,
99
+ ln: ln,
100
+ pow: pow,
101
+ sin: sin,
102
+ tan: tan,
103
+ cos: cos,
104
+ acos: acos,
105
+ asin: asin,
106
+ atan: atan,
107
+ atan2: atan2,
108
+ truncate: truncate,
109
+ round: round,
110
+ ceiling: ceiling,
111
+ floor: floor,
112
+ isItNaN: isItNaN,
113
+ even: even,
114
+ odd: odd,
115
+ gcd: gcd,
116
+ lcm: lcm
117
+ };
118
+ function curry$(f, bound){
119
+ var context,
120
+ _curry = function(args) {
121
+ return f.length > 1 ? function(){
122
+ var params = args ? args.concat() : [];
123
+ context = bound ? context || this : this;
124
+ return params.push.apply(params, arguments) <
125
+ f.length && arguments.length ?
126
+ _curry.call(context, params) : f.apply(context, params);
127
+ } : f;
128
+ };
129
+ return _curry();
130
+ }
@@ -0,0 +1,154 @@
1
+ // Generated by LiveScript 1.4.0
2
+ var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find;
3
+ values = function(object){
4
+ var i$, x, results$ = [];
5
+ for (i$ in object) {
6
+ x = object[i$];
7
+ results$.push(x);
8
+ }
9
+ return results$;
10
+ };
11
+ keys = function(object){
12
+ var x, results$ = [];
13
+ for (x in object) {
14
+ results$.push(x);
15
+ }
16
+ return results$;
17
+ };
18
+ pairsToObj = function(object){
19
+ var i$, len$, x, resultObj$ = {};
20
+ for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
21
+ x = object[i$];
22
+ resultObj$[x[0]] = x[1];
23
+ }
24
+ return resultObj$;
25
+ };
26
+ objToPairs = function(object){
27
+ var key, value, results$ = [];
28
+ for (key in object) {
29
+ value = object[key];
30
+ results$.push([key, value]);
31
+ }
32
+ return results$;
33
+ };
34
+ listsToObj = curry$(function(keys, values){
35
+ var i$, len$, i, key, resultObj$ = {};
36
+ for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
37
+ i = i$;
38
+ key = keys[i$];
39
+ resultObj$[key] = values[i];
40
+ }
41
+ return resultObj$;
42
+ });
43
+ objToLists = function(object){
44
+ var keys, values, key, value;
45
+ keys = [];
46
+ values = [];
47
+ for (key in object) {
48
+ value = object[key];
49
+ keys.push(key);
50
+ values.push(value);
51
+ }
52
+ return [keys, values];
53
+ };
54
+ empty = function(object){
55
+ var x;
56
+ for (x in object) {
57
+ return false;
58
+ }
59
+ return true;
60
+ };
61
+ each = curry$(function(f, object){
62
+ var i$, x;
63
+ for (i$ in object) {
64
+ x = object[i$];
65
+ f(x);
66
+ }
67
+ return object;
68
+ });
69
+ map = curry$(function(f, object){
70
+ var k, x, resultObj$ = {};
71
+ for (k in object) {
72
+ x = object[k];
73
+ resultObj$[k] = f(x);
74
+ }
75
+ return resultObj$;
76
+ });
77
+ compact = function(object){
78
+ var k, x, resultObj$ = {};
79
+ for (k in object) {
80
+ x = object[k];
81
+ if (x) {
82
+ resultObj$[k] = x;
83
+ }
84
+ }
85
+ return resultObj$;
86
+ };
87
+ filter = curry$(function(f, object){
88
+ var k, x, resultObj$ = {};
89
+ for (k in object) {
90
+ x = object[k];
91
+ if (f(x)) {
92
+ resultObj$[k] = x;
93
+ }
94
+ }
95
+ return resultObj$;
96
+ });
97
+ reject = curry$(function(f, object){
98
+ var k, x, resultObj$ = {};
99
+ for (k in object) {
100
+ x = object[k];
101
+ if (!f(x)) {
102
+ resultObj$[k] = x;
103
+ }
104
+ }
105
+ return resultObj$;
106
+ });
107
+ partition = curry$(function(f, object){
108
+ var passed, failed, k, x;
109
+ passed = {};
110
+ failed = {};
111
+ for (k in object) {
112
+ x = object[k];
113
+ (f(x) ? passed : failed)[k] = x;
114
+ }
115
+ return [passed, failed];
116
+ });
117
+ find = curry$(function(f, object){
118
+ var i$, x;
119
+ for (i$ in object) {
120
+ x = object[i$];
121
+ if (f(x)) {
122
+ return x;
123
+ }
124
+ }
125
+ });
126
+ module.exports = {
127
+ values: values,
128
+ keys: keys,
129
+ pairsToObj: pairsToObj,
130
+ objToPairs: objToPairs,
131
+ listsToObj: listsToObj,
132
+ objToLists: objToLists,
133
+ empty: empty,
134
+ each: each,
135
+ map: map,
136
+ filter: filter,
137
+ compact: compact,
138
+ reject: reject,
139
+ partition: partition,
140
+ find: find
141
+ };
142
+ function curry$(f, bound){
143
+ var context,
144
+ _curry = function(args) {
145
+ return f.length > 1 ? function(){
146
+ var params = args ? args.concat() : [];
147
+ context = bound ? context || this : this;
148
+ return params.push.apply(params, arguments) <
149
+ f.length && arguments.length ?
150
+ _curry.call(context, params) : f.apply(context, params);
151
+ } : f;
152
+ };
153
+ return _curry();
154
+ }
@@ -0,0 +1,92 @@
1
+ // Generated by LiveScript 1.4.0
2
+ var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize;
3
+ split = curry$(function(sep, str){
4
+ return str.split(sep);
5
+ });
6
+ join = curry$(function(sep, xs){
7
+ return xs.join(sep);
8
+ });
9
+ lines = function(str){
10
+ if (!str.length) {
11
+ return [];
12
+ }
13
+ return str.split('\n');
14
+ };
15
+ unlines = function(it){
16
+ return it.join('\n');
17
+ };
18
+ words = function(str){
19
+ if (!str.length) {
20
+ return [];
21
+ }
22
+ return str.split(/[ ]+/);
23
+ };
24
+ unwords = function(it){
25
+ return it.join(' ');
26
+ };
27
+ chars = function(it){
28
+ return it.split('');
29
+ };
30
+ unchars = function(it){
31
+ return it.join('');
32
+ };
33
+ reverse = function(str){
34
+ return str.split('').reverse().join('');
35
+ };
36
+ repeat = curry$(function(n, str){
37
+ var result, i$;
38
+ result = '';
39
+ for (i$ = 0; i$ < n; ++i$) {
40
+ result += str;
41
+ }
42
+ return result;
43
+ });
44
+ capitalize = function(str){
45
+ return str.charAt(0).toUpperCase() + str.slice(1);
46
+ };
47
+ camelize = function(it){
48
+ return it.replace(/[-_]+(.)?/g, function(arg$, c){
49
+ return (c != null ? c : '').toUpperCase();
50
+ });
51
+ };
52
+ dasherize = function(str){
53
+ return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){
54
+ return lower + "-" + (upper.length > 1
55
+ ? upper
56
+ : upper.toLowerCase());
57
+ }).replace(/^([A-Z]+)/, function(arg$, upper){
58
+ if (upper.length > 1) {
59
+ return upper + "-";
60
+ } else {
61
+ return upper.toLowerCase();
62
+ }
63
+ });
64
+ };
65
+ module.exports = {
66
+ split: split,
67
+ join: join,
68
+ lines: lines,
69
+ unlines: unlines,
70
+ words: words,
71
+ unwords: unwords,
72
+ chars: chars,
73
+ unchars: unchars,
74
+ reverse: reverse,
75
+ repeat: repeat,
76
+ capitalize: capitalize,
77
+ camelize: camelize,
78
+ dasherize: dasherize
79
+ };
80
+ function curry$(f, bound){
81
+ var context,
82
+ _curry = function(args) {
83
+ return f.length > 1 ? function(){
84
+ var params = args ? args.concat() : [];
85
+ context = bound ? context || this : this;
86
+ return params.push.apply(params, arguments) <
87
+ f.length && arguments.length ?
88
+ _curry.call(context, params) : f.apply(context, params);
89
+ } : f;
90
+ };
91
+ return _curry();
92
+ }
@@ -0,0 +1,178 @@
1
+ // Generated by LiveScript 1.4.0
2
+ var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
3
+ Func = require('./Func.js');
4
+ List = require('./List.js');
5
+ Obj = require('./Obj.js');
6
+ Str = require('./Str.js');
7
+ Num = require('./Num.js');
8
+ id = function(x){
9
+ return x;
10
+ };
11
+ isType = curry$(function(type, x){
12
+ return toString$.call(x).slice(8, -1) === type;
13
+ });
14
+ replicate = curry$(function(n, x){
15
+ var i$, results$ = [];
16
+ for (i$ = 0; i$ < n; ++i$) {
17
+ results$.push(x);
18
+ }
19
+ return results$;
20
+ });
21
+ Str.empty = List.empty;
22
+ Str.slice = List.slice;
23
+ Str.take = List.take;
24
+ Str.drop = List.drop;
25
+ Str.splitAt = List.splitAt;
26
+ Str.takeWhile = List.takeWhile;
27
+ Str.dropWhile = List.dropWhile;
28
+ Str.span = List.span;
29
+ Str.breakStr = List.breakList;
30
+ prelude = {
31
+ Func: Func,
32
+ List: List,
33
+ Obj: Obj,
34
+ Str: Str,
35
+ Num: Num,
36
+ id: id,
37
+ isType: isType,
38
+ replicate: replicate
39
+ };
40
+ prelude.each = List.each;
41
+ prelude.map = List.map;
42
+ prelude.filter = List.filter;
43
+ prelude.compact = List.compact;
44
+ prelude.reject = List.reject;
45
+ prelude.partition = List.partition;
46
+ prelude.find = List.find;
47
+ prelude.head = List.head;
48
+ prelude.first = List.first;
49
+ prelude.tail = List.tail;
50
+ prelude.last = List.last;
51
+ prelude.initial = List.initial;
52
+ prelude.empty = List.empty;
53
+ prelude.reverse = List.reverse;
54
+ prelude.difference = List.difference;
55
+ prelude.intersection = List.intersection;
56
+ prelude.union = List.union;
57
+ prelude.countBy = List.countBy;
58
+ prelude.groupBy = List.groupBy;
59
+ prelude.fold = List.fold;
60
+ prelude.foldl = List.foldl;
61
+ prelude.fold1 = List.fold1;
62
+ prelude.foldl1 = List.foldl1;
63
+ prelude.foldr = List.foldr;
64
+ prelude.foldr1 = List.foldr1;
65
+ prelude.unfoldr = List.unfoldr;
66
+ prelude.andList = List.andList;
67
+ prelude.orList = List.orList;
68
+ prelude.any = List.any;
69
+ prelude.all = List.all;
70
+ prelude.unique = List.unique;
71
+ prelude.uniqueBy = List.uniqueBy;
72
+ prelude.sort = List.sort;
73
+ prelude.sortWith = List.sortWith;
74
+ prelude.sortBy = List.sortBy;
75
+ prelude.sum = List.sum;
76
+ prelude.product = List.product;
77
+ prelude.mean = List.mean;
78
+ prelude.average = List.average;
79
+ prelude.concat = List.concat;
80
+ prelude.concatMap = List.concatMap;
81
+ prelude.flatten = List.flatten;
82
+ prelude.maximum = List.maximum;
83
+ prelude.minimum = List.minimum;
84
+ prelude.maximumBy = List.maximumBy;
85
+ prelude.minimumBy = List.minimumBy;
86
+ prelude.scan = List.scan;
87
+ prelude.scanl = List.scanl;
88
+ prelude.scan1 = List.scan1;
89
+ prelude.scanl1 = List.scanl1;
90
+ prelude.scanr = List.scanr;
91
+ prelude.scanr1 = List.scanr1;
92
+ prelude.slice = List.slice;
93
+ prelude.take = List.take;
94
+ prelude.drop = List.drop;
95
+ prelude.splitAt = List.splitAt;
96
+ prelude.takeWhile = List.takeWhile;
97
+ prelude.dropWhile = List.dropWhile;
98
+ prelude.span = List.span;
99
+ prelude.breakList = List.breakList;
100
+ prelude.zip = List.zip;
101
+ prelude.zipWith = List.zipWith;
102
+ prelude.zipAll = List.zipAll;
103
+ prelude.zipAllWith = List.zipAllWith;
104
+ prelude.at = List.at;
105
+ prelude.elemIndex = List.elemIndex;
106
+ prelude.elemIndices = List.elemIndices;
107
+ prelude.findIndex = List.findIndex;
108
+ prelude.findIndices = List.findIndices;
109
+ prelude.apply = Func.apply;
110
+ prelude.curry = Func.curry;
111
+ prelude.flip = Func.flip;
112
+ prelude.fix = Func.fix;
113
+ prelude.over = Func.over;
114
+ prelude.split = Str.split;
115
+ prelude.join = Str.join;
116
+ prelude.lines = Str.lines;
117
+ prelude.unlines = Str.unlines;
118
+ prelude.words = Str.words;
119
+ prelude.unwords = Str.unwords;
120
+ prelude.chars = Str.chars;
121
+ prelude.unchars = Str.unchars;
122
+ prelude.repeat = Str.repeat;
123
+ prelude.capitalize = Str.capitalize;
124
+ prelude.camelize = Str.camelize;
125
+ prelude.dasherize = Str.dasherize;
126
+ prelude.values = Obj.values;
127
+ prelude.keys = Obj.keys;
128
+ prelude.pairsToObj = Obj.pairsToObj;
129
+ prelude.objToPairs = Obj.objToPairs;
130
+ prelude.listsToObj = Obj.listsToObj;
131
+ prelude.objToLists = Obj.objToLists;
132
+ prelude.max = Num.max;
133
+ prelude.min = Num.min;
134
+ prelude.negate = Num.negate;
135
+ prelude.abs = Num.abs;
136
+ prelude.signum = Num.signum;
137
+ prelude.quot = Num.quot;
138
+ prelude.rem = Num.rem;
139
+ prelude.div = Num.div;
140
+ prelude.mod = Num.mod;
141
+ prelude.recip = Num.recip;
142
+ prelude.pi = Num.pi;
143
+ prelude.tau = Num.tau;
144
+ prelude.exp = Num.exp;
145
+ prelude.sqrt = Num.sqrt;
146
+ prelude.ln = Num.ln;
147
+ prelude.pow = Num.pow;
148
+ prelude.sin = Num.sin;
149
+ prelude.tan = Num.tan;
150
+ prelude.cos = Num.cos;
151
+ prelude.acos = Num.acos;
152
+ prelude.asin = Num.asin;
153
+ prelude.atan = Num.atan;
154
+ prelude.atan2 = Num.atan2;
155
+ prelude.truncate = Num.truncate;
156
+ prelude.round = Num.round;
157
+ prelude.ceiling = Num.ceiling;
158
+ prelude.floor = Num.floor;
159
+ prelude.isItNaN = Num.isItNaN;
160
+ prelude.even = Num.even;
161
+ prelude.odd = Num.odd;
162
+ prelude.gcd = Num.gcd;
163
+ prelude.lcm = Num.lcm;
164
+ prelude.VERSION = '1.1.2';
165
+ module.exports = prelude;
166
+ function curry$(f, bound){
167
+ var context,
168
+ _curry = function(args) {
169
+ return f.length > 1 ? function(){
170
+ var params = args ? args.concat() : [];
171
+ context = bound ? context || this : this;
172
+ return params.push.apply(params, arguments) <
173
+ f.length && arguments.length ?
174
+ _curry.call(context, params) : f.apply(context, params);
175
+ } : f;
176
+ };
177
+ return _curry();
178
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "prelude-ls",
3
+ "version": "1.1.2",
4
+ "author": "George Zahariev <z@georgezahariev.com>",
5
+ "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.",
6
+ "keywords": [
7
+ "prelude",
8
+ "livescript",
9
+ "utility",
10
+ "ls",
11
+ "coffeescript",
12
+ "javascript",
13
+ "library",
14
+ "functional",
15
+ "array",
16
+ "list",
17
+ "object",
18
+ "string"
19
+ ],
20
+ "main": "lib/",
21
+ "files": [
22
+ "lib/",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "homepage": "http://preludels.com",
27
+ "bugs": "https://github.com/gkz/prelude-ls/issues",
28
+ "licenses": [
29
+ {
30
+ "type": "MIT",
31
+ "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE"
32
+ }
33
+ ],
34
+ "engines": {
35
+ "node": ">= 0.8.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git://github.com/gkz/prelude-ls.git"
40
+ },
41
+ "scripts": {
42
+ "test": "make test"
43
+ },
44
+ "devDependencies": {
45
+ "livescript": "~1.4.0",
46
+ "uglify-js": "~2.4.12",
47
+ "mocha": "~2.2.4",
48
+ "istanbul": "~0.2.4",
49
+ "browserify": "~3.24.13",
50
+ "sinon": "~1.10.2"
51
+ }
52
+ }
@@ -0,0 +1,65 @@
1
+ # v3.0
2
+
3
+ - Add `--preserve-root` option to executable (default true)
4
+ - Drop support for Node.js below version 6
5
+
6
+ # v2.7
7
+
8
+ - Make `glob` an optional dependency
9
+
10
+ # 2.6
11
+
12
+ - Retry on EBUSY on non-windows platforms as well
13
+ - Make `rimraf.sync` 10000% more reliable on Windows
14
+
15
+ # 2.5
16
+
17
+ - Handle Windows EPERM when lstat-ing read-only dirs
18
+ - Add glob option to pass options to glob
19
+
20
+ # 2.4
21
+
22
+ - Add EPERM to delay/retry loop
23
+ - Add `disableGlob` option
24
+
25
+ # 2.3
26
+
27
+ - Make maxBusyTries and emfileWait configurable
28
+ - Handle weird SunOS unlink-dir issue
29
+ - Glob the CLI arg for better Windows support
30
+
31
+ # 2.2
32
+
33
+ - Handle ENOENT properly on Windows
34
+ - Allow overriding fs methods
35
+ - Treat EPERM as indicative of non-empty dir
36
+ - Remove optional graceful-fs dep
37
+ - Consistently return null error instead of undefined on success
38
+ - win32: Treat ENOTEMPTY the same as EBUSY
39
+ - Add `rimraf` binary
40
+
41
+ # 2.1
42
+
43
+ - Fix SunOS error code for a non-empty directory
44
+ - Try rmdir before readdir
45
+ - Treat EISDIR like EPERM
46
+ - Remove chmod
47
+ - Remove lstat polyfill, node 0.7 is not supported
48
+
49
+ # 2.0
50
+
51
+ - Fix myGid call to check process.getgid
52
+ - Simplify the EBUSY backoff logic.
53
+ - Use fs.lstat in node >= 0.7.9
54
+ - Remove gently option
55
+ - remove fiber implementation
56
+ - Delete files that are marked read-only
57
+
58
+ # 1.0
59
+
60
+ - Allow ENOENT in sync method
61
+ - Throw when no callback is provided
62
+ - Make opts.gently an absolute path
63
+ - use 'stat' if 'lstat' is not available
64
+ - Consistent error naming, and rethrow non-ENOENT stat errors
65
+ - add fiber implementation
@@ -0,0 +1,15 @@
1
+ The ISC License
2
+
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.