@zipify/wysiwyg 1.1.0-2 → 1.1.1

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 (148) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/wysiwyg.mjs +10 -17
  3. package/lib/extensions/Alignment.js +10 -8
  4. package/lib/extensions/FontSize.js +8 -3
  5. package/lib/extensions/LineHeight.js +10 -4
  6. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +3 -3
  7. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +9 -9
  8. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +5 -5
  9. package/lib/services/NodeFactory.js +4 -1
  10. package/node_modules_lambda/acorn-globals/node_modules/.bin/acorn +4 -0
  11. package/node_modules_lambda/acorn-globals/node_modules/acorn/CHANGELOG.md +620 -0
  12. package/node_modules_lambda/acorn-globals/node_modules/acorn/LICENSE +21 -0
  13. package/node_modules_lambda/acorn-globals/node_modules/acorn/README.md +269 -0
  14. package/node_modules_lambda/acorn-globals/node_modules/acorn/bin/acorn +4 -0
  15. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.d.ts +209 -0
  16. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js +5186 -0
  17. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js.map +1 -0
  18. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs +5155 -0
  19. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  20. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.map +1 -0
  21. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/bin.js +64 -0
  22. package/node_modules_lambda/acorn-globals/node_modules/acorn/package.json +35 -0
  23. package/node_modules_lambda/cssstyle/node_modules/cssom/LICENSE.txt +20 -0
  24. package/node_modules_lambda/cssstyle/node_modules/cssom/README.mdown +67 -0
  25. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
  26. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
  27. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSHostRule.js +37 -0
  28. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSImportRule.js +132 -0
  29. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
  30. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
  31. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSMediaRule.js +41 -0
  32. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSOM.js +3 -0
  33. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSRule.js +43 -0
  34. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
  35. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleRule.js +190 -0
  36. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
  37. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js +36 -0
  38. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValue.js +43 -0
  39. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValueExpression.js +344 -0
  40. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MatcherList.js +62 -0
  41. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MediaList.js +61 -0
  42. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/StyleSheet.js +17 -0
  43. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/clone.js +82 -0
  44. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/index.js +21 -0
  45. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/parse.js +464 -0
  46. package/node_modules_lambda/cssstyle/node_modules/cssom/package.json +18 -0
  47. package/node_modules_lambda/data-urls/node_modules/whatwg-url/LICENSE.txt +21 -0
  48. package/node_modules_lambda/data-urls/node_modules/whatwg-url/README.md +106 -0
  49. package/node_modules_lambda/data-urls/node_modules/whatwg-url/index.js +27 -0
  50. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/Function.js +42 -0
  51. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL-impl.js +209 -0
  52. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL.js +442 -0
  53. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams-impl.js +130 -0
  54. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams.js +472 -0
  55. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/VoidFunction.js +26 -0
  56. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/encoding.js +16 -0
  57. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/infra.js +26 -0
  58. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/percent-encoding.js +142 -0
  59. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/url-state-machine.js +1244 -0
  60. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/urlencoded.js +106 -0
  61. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/utils.js +190 -0
  62. package/node_modules_lambda/data-urls/node_modules/whatwg-url/package.json +58 -0
  63. package/node_modules_lambda/data-urls/node_modules/whatwg-url/webidl2js-wrapper.js +7 -0
  64. package/node_modules_lambda/escodegen/node_modules/estraverse/.jshintrc +16 -0
  65. package/node_modules_lambda/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
  66. package/node_modules_lambda/escodegen/node_modules/estraverse/README.md +153 -0
  67. package/node_modules_lambda/escodegen/node_modules/estraverse/estraverse.js +805 -0
  68. package/node_modules_lambda/escodegen/node_modules/estraverse/gulpfile.js +70 -0
  69. package/node_modules_lambda/escodegen/node_modules/estraverse/package.json +40 -0
  70. package/node_modules_lambda/escodegen/node_modules/levn/LICENSE +22 -0
  71. package/node_modules_lambda/escodegen/node_modules/levn/README.md +196 -0
  72. package/node_modules_lambda/escodegen/node_modules/levn/lib/cast.js +298 -0
  73. package/node_modules_lambda/escodegen/node_modules/levn/lib/coerce.js +285 -0
  74. package/node_modules_lambda/escodegen/node_modules/levn/lib/index.js +22 -0
  75. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse-string.js +113 -0
  76. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse.js +102 -0
  77. package/node_modules_lambda/escodegen/node_modules/levn/package.json +47 -0
  78. package/node_modules_lambda/escodegen/node_modules/optionator/CHANGELOG.md +56 -0
  79. package/node_modules_lambda/escodegen/node_modules/optionator/LICENSE +22 -0
  80. package/node_modules_lambda/escodegen/node_modules/optionator/README.md +238 -0
  81. package/node_modules_lambda/escodegen/node_modules/optionator/lib/help.js +260 -0
  82. package/node_modules_lambda/escodegen/node_modules/optionator/lib/index.js +465 -0
  83. package/node_modules_lambda/escodegen/node_modules/optionator/lib/util.js +54 -0
  84. package/node_modules_lambda/escodegen/node_modules/optionator/package.json +44 -0
  85. package/node_modules_lambda/escodegen/node_modules/prelude-ls/CHANGELOG.md +99 -0
  86. package/node_modules_lambda/escodegen/node_modules/prelude-ls/LICENSE +22 -0
  87. package/node_modules_lambda/escodegen/node_modules/prelude-ls/README.md +15 -0
  88. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Func.js +65 -0
  89. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/List.js +686 -0
  90. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Num.js +130 -0
  91. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Obj.js +154 -0
  92. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Str.js +92 -0
  93. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/index.js +178 -0
  94. package/node_modules_lambda/escodegen/node_modules/prelude-ls/package.json +52 -0
  95. package/node_modules_lambda/escodegen/node_modules/source-map/CHANGELOG.md +301 -0
  96. package/node_modules_lambda/escodegen/node_modules/source-map/LICENSE +28 -0
  97. package/node_modules_lambda/escodegen/node_modules/source-map/README.md +742 -0
  98. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.debug.js +3234 -0
  99. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.js +3233 -0
  100. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js +2 -0
  101. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js.map +1 -0
  102. package/node_modules_lambda/escodegen/node_modules/source-map/lib/array-set.js +121 -0
  103. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64-vlq.js +140 -0
  104. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64.js +67 -0
  105. package/node_modules_lambda/escodegen/node_modules/source-map/lib/binary-search.js +111 -0
  106. package/node_modules_lambda/escodegen/node_modules/source-map/lib/mapping-list.js +79 -0
  107. package/node_modules_lambda/escodegen/node_modules/source-map/lib/quick-sort.js +114 -0
  108. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  109. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-generator.js +425 -0
  110. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-node.js +413 -0
  111. package/node_modules_lambda/escodegen/node_modules/source-map/lib/util.js +488 -0
  112. package/node_modules_lambda/escodegen/node_modules/source-map/package.json +73 -0
  113. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.d.ts +98 -0
  114. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.js +8 -0
  115. package/node_modules_lambda/escodegen/node_modules/type-check/LICENSE +22 -0
  116. package/node_modules_lambda/escodegen/node_modules/type-check/README.md +210 -0
  117. package/node_modules_lambda/escodegen/node_modules/type-check/lib/check.js +126 -0
  118. package/node_modules_lambda/escodegen/node_modules/type-check/lib/index.js +16 -0
  119. package/node_modules_lambda/escodegen/node_modules/type-check/lib/parse-type.js +196 -0
  120. package/node_modules_lambda/escodegen/node_modules/type-check/package.json +40 -0
  121. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/.github/dependabot.yml +11 -0
  122. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/Changelog.md +212 -0
  123. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/LICENSE +21 -0
  124. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/README.md +130 -0
  125. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +597 -0
  126. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +188 -0
  127. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +23 -0
  128. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +198 -0
  129. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  130. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  131. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
  132. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  133. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  134. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  135. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  136. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  137. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  138. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  139. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  140. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +197 -0
  141. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js +319 -0
  142. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +290 -0
  143. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +52 -0
  144. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts +41 -0
  145. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.js +180 -0
  146. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +109 -0
  147. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/package.json +44 -0
  148. package/package.json +1 -1
@@ -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
+ }