protobufjs 6.11.2 → 7.1.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.
Files changed (259) hide show
  1. package/README.md +7 -174
  2. package/dist/light/protobuf.js +77 -29
  3. package/dist/light/protobuf.js.map +1 -1
  4. package/dist/light/protobuf.min.js +3 -3
  5. package/dist/light/protobuf.min.js.map +1 -1
  6. package/dist/minimal/protobuf.js +27 -10
  7. package/dist/minimal/protobuf.js.map +1 -1
  8. package/dist/minimal/protobuf.min.js +3 -3
  9. package/dist/minimal/protobuf.min.js.map +1 -1
  10. package/dist/protobuf.js +163 -61
  11. package/dist/protobuf.js.map +1 -1
  12. package/dist/protobuf.min.js +3 -3
  13. package/dist/protobuf.min.js.map +1 -1
  14. package/index.d.ts +9 -7
  15. package/package.json +14 -33
  16. package/scripts/postinstall.js +0 -3
  17. package/src/converter.js +10 -4
  18. package/src/decoder.js +4 -3
  19. package/src/enum.js +24 -7
  20. package/src/field.js +6 -3
  21. package/src/namespace.js +3 -3
  22. package/src/parse.js +55 -16
  23. package/src/roots.js +1 -1
  24. package/src/tokenize.js +31 -16
  25. package/src/util/minimal.js +24 -7
  26. package/src/util.js +3 -0
  27. package/src/wrappers.js +2 -2
  28. package/tsconfig.json +2 -1
  29. package/CHANGELOG.md +0 -1019
  30. package/bin/pbjs +0 -6
  31. package/bin/pbts +0 -6
  32. package/cli/LICENSE +0 -33
  33. package/cli/README.md +0 -174
  34. package/cli/bin/pbjs +0 -6
  35. package/cli/bin/pbts +0 -6
  36. package/cli/index.d.ts +0 -3
  37. package/cli/index.js +0 -3
  38. package/cli/lib/tsd-jsdoc/LICENSE +0 -21
  39. package/cli/lib/tsd-jsdoc/README.md +0 -23
  40. package/cli/lib/tsd-jsdoc/plugin.js +0 -21
  41. package/cli/lib/tsd-jsdoc/publish.js +0 -705
  42. package/cli/lib/tsd-jsdoc.json +0 -18
  43. package/cli/node_modules/.package-lock.json +0 -256
  44. package/cli/node_modules/acorn/CHANGELOG.md +0 -620
  45. package/cli/node_modules/acorn/LICENSE +0 -21
  46. package/cli/node_modules/acorn/README.md +0 -269
  47. package/cli/node_modules/acorn/bin/acorn +0 -4
  48. package/cli/node_modules/acorn/dist/acorn.d.ts +0 -209
  49. package/cli/node_modules/acorn/dist/acorn.js +0 -5186
  50. package/cli/node_modules/acorn/dist/acorn.js.map +0 -1
  51. package/cli/node_modules/acorn/dist/acorn.mjs +0 -5155
  52. package/cli/node_modules/acorn/dist/acorn.mjs.d.ts +0 -2
  53. package/cli/node_modules/acorn/dist/acorn.mjs.map +0 -1
  54. package/cli/node_modules/acorn/dist/bin.js +0 -64
  55. package/cli/node_modules/acorn/package.json +0 -35
  56. package/cli/node_modules/acorn-jsx/LICENSE +0 -19
  57. package/cli/node_modules/acorn-jsx/README.md +0 -40
  58. package/cli/node_modules/acorn-jsx/index.js +0 -488
  59. package/cli/node_modules/acorn-jsx/package.json +0 -27
  60. package/cli/node_modules/acorn-jsx/xhtml.js +0 -255
  61. package/cli/node_modules/balanced-match/.npmignore +0 -5
  62. package/cli/node_modules/balanced-match/LICENSE.md +0 -21
  63. package/cli/node_modules/balanced-match/README.md +0 -91
  64. package/cli/node_modules/balanced-match/index.js +0 -59
  65. package/cli/node_modules/balanced-match/package.json +0 -49
  66. package/cli/node_modules/brace-expansion/LICENSE +0 -21
  67. package/cli/node_modules/brace-expansion/README.md +0 -129
  68. package/cli/node_modules/brace-expansion/index.js +0 -201
  69. package/cli/node_modules/brace-expansion/package.json +0 -47
  70. package/cli/node_modules/concat-map/.travis.yml +0 -4
  71. package/cli/node_modules/concat-map/LICENSE +0 -18
  72. package/cli/node_modules/concat-map/README.markdown +0 -62
  73. package/cli/node_modules/concat-map/example/map.js +0 -6
  74. package/cli/node_modules/concat-map/index.js +0 -13
  75. package/cli/node_modules/concat-map/package.json +0 -43
  76. package/cli/node_modules/concat-map/test/map.js +0 -39
  77. package/cli/node_modules/deep-is/.npmignore +0 -1
  78. package/cli/node_modules/deep-is/.travis.yml +0 -6
  79. package/cli/node_modules/deep-is/LICENSE +0 -22
  80. package/cli/node_modules/deep-is/README.markdown +0 -70
  81. package/cli/node_modules/deep-is/example/cmp.js +0 -11
  82. package/cli/node_modules/deep-is/index.js +0 -102
  83. package/cli/node_modules/deep-is/package.json +0 -61
  84. package/cli/node_modules/deep-is/test/NaN.js +0 -16
  85. package/cli/node_modules/deep-is/test/cmp.js +0 -23
  86. package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +0 -15
  87. package/cli/node_modules/escodegen/LICENSE.BSD +0 -21
  88. package/cli/node_modules/escodegen/README.md +0 -84
  89. package/cli/node_modules/escodegen/bin/escodegen.js +0 -77
  90. package/cli/node_modules/escodegen/bin/esgenerate.js +0 -64
  91. package/cli/node_modules/escodegen/escodegen.js +0 -2647
  92. package/cli/node_modules/escodegen/package.json +0 -62
  93. package/cli/node_modules/eslint-visitor-keys/CHANGELOG.md +0 -25
  94. package/cli/node_modules/eslint-visitor-keys/LICENSE +0 -201
  95. package/cli/node_modules/eslint-visitor-keys/README.md +0 -98
  96. package/cli/node_modules/eslint-visitor-keys/lib/index.js +0 -81
  97. package/cli/node_modules/eslint-visitor-keys/lib/visitor-keys.json +0 -284
  98. package/cli/node_modules/eslint-visitor-keys/package.json +0 -40
  99. package/cli/node_modules/espree/CHANGELOG.md +0 -509
  100. package/cli/node_modules/espree/LICENSE +0 -25
  101. package/cli/node_modules/espree/README.md +0 -233
  102. package/cli/node_modules/espree/espree.js +0 -177
  103. package/cli/node_modules/espree/lib/ast-node-types.js +0 -96
  104. package/cli/node_modules/espree/lib/espree.js +0 -286
  105. package/cli/node_modules/espree/lib/features.js +0 -29
  106. package/cli/node_modules/espree/lib/options.js +0 -106
  107. package/cli/node_modules/espree/lib/token-translator.js +0 -263
  108. package/cli/node_modules/espree/lib/visitor-keys.js +0 -123
  109. package/cli/node_modules/espree/package.json +0 -64
  110. package/cli/node_modules/esprima/ChangeLog +0 -235
  111. package/cli/node_modules/esprima/LICENSE.BSD +0 -21
  112. package/cli/node_modules/esprima/README.md +0 -46
  113. package/cli/node_modules/esprima/bin/esparse.js +0 -139
  114. package/cli/node_modules/esprima/bin/esvalidate.js +0 -236
  115. package/cli/node_modules/esprima/dist/esprima.js +0 -6709
  116. package/cli/node_modules/esprima/package.json +0 -112
  117. package/cli/node_modules/estraverse/.jshintrc +0 -16
  118. package/cli/node_modules/estraverse/LICENSE.BSD +0 -19
  119. package/cli/node_modules/estraverse/README.md +0 -153
  120. package/cli/node_modules/estraverse/estraverse.js +0 -801
  121. package/cli/node_modules/estraverse/gulpfile.js +0 -70
  122. package/cli/node_modules/estraverse/package.json +0 -40
  123. package/cli/node_modules/esutils/LICENSE.BSD +0 -19
  124. package/cli/node_modules/esutils/README.md +0 -174
  125. package/cli/node_modules/esutils/lib/ast.js +0 -144
  126. package/cli/node_modules/esutils/lib/code.js +0 -135
  127. package/cli/node_modules/esutils/lib/keyword.js +0 -165
  128. package/cli/node_modules/esutils/lib/utils.js +0 -33
  129. package/cli/node_modules/esutils/package.json +0 -44
  130. package/cli/node_modules/fast-levenshtein/LICENSE.md +0 -25
  131. package/cli/node_modules/fast-levenshtein/README.md +0 -104
  132. package/cli/node_modules/fast-levenshtein/levenshtein.js +0 -136
  133. package/cli/node_modules/fast-levenshtein/package.json +0 -39
  134. package/cli/node_modules/fs.realpath/LICENSE +0 -43
  135. package/cli/node_modules/fs.realpath/README.md +0 -33
  136. package/cli/node_modules/fs.realpath/index.js +0 -66
  137. package/cli/node_modules/fs.realpath/old.js +0 -303
  138. package/cli/node_modules/fs.realpath/package.json +0 -26
  139. package/cli/node_modules/glob/LICENSE +0 -21
  140. package/cli/node_modules/glob/README.md +0 -375
  141. package/cli/node_modules/glob/changelog.md +0 -67
  142. package/cli/node_modules/glob/common.js +0 -240
  143. package/cli/node_modules/glob/glob.js +0 -790
  144. package/cli/node_modules/glob/package.json +0 -46
  145. package/cli/node_modules/glob/sync.js +0 -486
  146. package/cli/node_modules/inflight/LICENSE +0 -15
  147. package/cli/node_modules/inflight/README.md +0 -37
  148. package/cli/node_modules/inflight/inflight.js +0 -54
  149. package/cli/node_modules/inflight/package.json +0 -29
  150. package/cli/node_modules/inherits/LICENSE +0 -16
  151. package/cli/node_modules/inherits/README.md +0 -42
  152. package/cli/node_modules/inherits/inherits.js +0 -9
  153. package/cli/node_modules/inherits/inherits_browser.js +0 -27
  154. package/cli/node_modules/inherits/package.json +0 -29
  155. package/cli/node_modules/levn/LICENSE +0 -22
  156. package/cli/node_modules/levn/README.md +0 -196
  157. package/cli/node_modules/levn/lib/cast.js +0 -298
  158. package/cli/node_modules/levn/lib/coerce.js +0 -285
  159. package/cli/node_modules/levn/lib/index.js +0 -22
  160. package/cli/node_modules/levn/lib/parse-string.js +0 -113
  161. package/cli/node_modules/levn/lib/parse.js +0 -102
  162. package/cli/node_modules/levn/package.json +0 -47
  163. package/cli/node_modules/minimatch/LICENSE +0 -15
  164. package/cli/node_modules/minimatch/README.md +0 -209
  165. package/cli/node_modules/minimatch/minimatch.js +0 -923
  166. package/cli/node_modules/minimatch/package.json +0 -30
  167. package/cli/node_modules/once/LICENSE +0 -15
  168. package/cli/node_modules/once/README.md +0 -79
  169. package/cli/node_modules/once/once.js +0 -42
  170. package/cli/node_modules/once/package.json +0 -33
  171. package/cli/node_modules/optionator/CHANGELOG.md +0 -56
  172. package/cli/node_modules/optionator/LICENSE +0 -22
  173. package/cli/node_modules/optionator/README.md +0 -238
  174. package/cli/node_modules/optionator/lib/help.js +0 -260
  175. package/cli/node_modules/optionator/lib/index.js +0 -465
  176. package/cli/node_modules/optionator/lib/util.js +0 -54
  177. package/cli/node_modules/optionator/package.json +0 -44
  178. package/cli/node_modules/path-is-absolute/index.js +0 -20
  179. package/cli/node_modules/path-is-absolute/license +0 -21
  180. package/cli/node_modules/path-is-absolute/package.json +0 -43
  181. package/cli/node_modules/path-is-absolute/readme.md +0 -59
  182. package/cli/node_modules/prelude-ls/CHANGELOG.md +0 -99
  183. package/cli/node_modules/prelude-ls/LICENSE +0 -22
  184. package/cli/node_modules/prelude-ls/README.md +0 -15
  185. package/cli/node_modules/prelude-ls/lib/Func.js +0 -65
  186. package/cli/node_modules/prelude-ls/lib/List.js +0 -686
  187. package/cli/node_modules/prelude-ls/lib/Num.js +0 -130
  188. package/cli/node_modules/prelude-ls/lib/Obj.js +0 -154
  189. package/cli/node_modules/prelude-ls/lib/Str.js +0 -92
  190. package/cli/node_modules/prelude-ls/lib/index.js +0 -178
  191. package/cli/node_modules/prelude-ls/package.json +0 -52
  192. package/cli/node_modules/rimraf/CHANGELOG.md +0 -65
  193. package/cli/node_modules/rimraf/LICENSE +0 -15
  194. package/cli/node_modules/rimraf/README.md +0 -101
  195. package/cli/node_modules/rimraf/bin.js +0 -68
  196. package/cli/node_modules/rimraf/package.json +0 -32
  197. package/cli/node_modules/rimraf/rimraf.js +0 -360
  198. package/cli/node_modules/source-map/CHANGELOG.md +0 -301
  199. package/cli/node_modules/source-map/LICENSE +0 -28
  200. package/cli/node_modules/source-map/README.md +0 -742
  201. package/cli/node_modules/source-map/dist/source-map.debug.js +0 -3234
  202. package/cli/node_modules/source-map/dist/source-map.js +0 -3233
  203. package/cli/node_modules/source-map/dist/source-map.min.js +0 -2
  204. package/cli/node_modules/source-map/dist/source-map.min.js.map +0 -1
  205. package/cli/node_modules/source-map/lib/array-set.js +0 -121
  206. package/cli/node_modules/source-map/lib/base64-vlq.js +0 -140
  207. package/cli/node_modules/source-map/lib/base64.js +0 -67
  208. package/cli/node_modules/source-map/lib/binary-search.js +0 -111
  209. package/cli/node_modules/source-map/lib/mapping-list.js +0 -79
  210. package/cli/node_modules/source-map/lib/quick-sort.js +0 -114
  211. package/cli/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  212. package/cli/node_modules/source-map/lib/source-map-generator.js +0 -425
  213. package/cli/node_modules/source-map/lib/source-node.js +0 -413
  214. package/cli/node_modules/source-map/lib/util.js +0 -488
  215. package/cli/node_modules/source-map/package.json +0 -73
  216. package/cli/node_modules/source-map/source-map.d.ts +0 -98
  217. package/cli/node_modules/source-map/source-map.js +0 -8
  218. package/cli/node_modules/tmp/CHANGELOG.md +0 -288
  219. package/cli/node_modules/tmp/LICENSE +0 -21
  220. package/cli/node_modules/tmp/README.md +0 -365
  221. package/cli/node_modules/tmp/lib/tmp.js +0 -780
  222. package/cli/node_modules/tmp/package.json +0 -58
  223. package/cli/node_modules/type-check/LICENSE +0 -22
  224. package/cli/node_modules/type-check/README.md +0 -210
  225. package/cli/node_modules/type-check/lib/check.js +0 -126
  226. package/cli/node_modules/type-check/lib/index.js +0 -16
  227. package/cli/node_modules/type-check/lib/parse-type.js +0 -196
  228. package/cli/node_modules/type-check/package.json +0 -40
  229. package/cli/node_modules/word-wrap/LICENSE +0 -21
  230. package/cli/node_modules/word-wrap/README.md +0 -182
  231. package/cli/node_modules/word-wrap/index.d.ts +0 -50
  232. package/cli/node_modules/word-wrap/index.js +0 -46
  233. package/cli/node_modules/word-wrap/package.json +0 -77
  234. package/cli/node_modules/wrappy/LICENSE +0 -15
  235. package/cli/node_modules/wrappy/README.md +0 -36
  236. package/cli/node_modules/wrappy/package.json +0 -29
  237. package/cli/node_modules/wrappy/wrappy.js +0 -33
  238. package/cli/package.json +0 -8
  239. package/cli/package.standalone.json +0 -32
  240. package/cli/pbjs.d.ts +0 -9
  241. package/cli/pbjs.js +0 -330
  242. package/cli/pbts.d.ts +0 -9
  243. package/cli/pbts.js +0 -197
  244. package/cli/targets/json-module.js +0 -38
  245. package/cli/targets/json.js +0 -8
  246. package/cli/targets/proto.js +0 -326
  247. package/cli/targets/proto2.js +0 -10
  248. package/cli/targets/proto3.js +0 -10
  249. package/cli/targets/static-module.js +0 -29
  250. package/cli/targets/static.js +0 -711
  251. package/cli/util.js +0 -183
  252. package/cli/wrappers/amd.js +0 -7
  253. package/cli/wrappers/closure.js +0 -7
  254. package/cli/wrappers/commonjs.js +0 -7
  255. package/cli/wrappers/default.js +0 -15
  256. package/cli/wrappers/es6.js +0 -5
  257. package/dist/README.md +0 -31
  258. package/dist/light/README.md +0 -31
  259. package/dist/minimal/README.md +0 -31
@@ -1,130 +0,0 @@
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
- }
@@ -1,154 +0,0 @@
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
- }
@@ -1,92 +0,0 @@
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
- }
@@ -1,178 +0,0 @@
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
- }
@@ -1,52 +0,0 @@
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
- }
@@ -1,65 +0,0 @@
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
@@ -1,15 +0,0 @@
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.