was.js – Diff between revs 33 and 34
?pathlinks?
Rev 33 | Rev 34 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | /*! was.js - v1.0.0 - 2018-02-11 |
1 | /*! was.js - v1.0.1 - 2019-03-04 |
|
2 | * http://grimore.org |
2 | * http://grimore.org |
|
3 | * Copyright (c) 2018 [object Object]; Licensed GPL-3.0 */ |
3 | * Copyright (c) 2019 [object Object]; Licensed GPL-3.0 */ |
|
4 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
4 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
5 | /*************************************************************************/ |
5 | /*************************************************************************/ |
|
6 | function wasProduct(a, b) { |
6 | function wasProduct(a, b) { |
|
7 | var m = Math.max(a.length, b.length); |
7 | var m = Math.max(a.length, b.length); |
|
8 | var o = {}; |
8 | var o = {}; |
|
Line 111... | Line 111... | |||
111 | } |
111 | } |
|
Line 112... | Line 112... | |||
112 | |
112 | |
|
113 | /*************************************************************************/ |
113 | /*************************************************************************/ |
|
114 | /* Node.JS package export. */ |
114 | /* Node.JS package export. */ |
|
- | 115 | /*************************************************************************/ |
||
115 | /*************************************************************************/ |
116 | if(typeof variable !== 'undefined') { |
|
116 | module.exports.collections = { |
117 | module.exports.collections = { |
|
117 | product: wasProduct, |
118 | product: wasProduct, |
|
118 | stride: wasStride, |
119 | stride: wasStride, |
|
119 | chunk: wasChunk, |
120 | chunk: wasChunk, |
|
- | 121 | equals: wasEquals |
||
120 | equals: wasEquals |
122 | }; |
|
Line 121... | Line 123... | |||
121 | }; |
123 | } |
|
122 | |
124 | |
|
123 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
125 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
124 | /*************************************************************************/ |
126 | /*************************************************************************/ |
|
Line 177... | Line 179... | |||
177 | } |
179 | } |
|
Line 178... | Line 180... | |||
178 | |
180 | |
|
179 | /*************************************************************************/ |
181 | /*************************************************************************/ |
|
180 | /* Node.JS package export. */ |
182 | /* Node.JS package export. */ |
|
- | 183 | /*************************************************************************/ |
||
181 | /*************************************************************************/ |
184 | if(typeof variable !== 'undefined') { |
|
182 | module.exports.formats = { |
185 | module.exports.formats = { |
|
183 | CSVToArray: wasCSVToArray, |
186 | CSVToArray: wasCSVToArray, |
|
- | 187 | ArrayToCSV: wasArrayToCSV |
||
184 | ArrayToCSV: wasArrayToCSV |
188 | }; |
|
- | 189 | } |
||
185 | }; |
190 | |
|
186 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
191 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
187 | /*************************************************************************/ |
192 | /*************************************************************************/ |
|
188 | function wasKeyValueToObject(a) { |
193 | function wasKeyValueToObject(a) { |
|
189 | var o = {}; |
194 | var o = {}; |
|
Line 201... | Line 206... | |||
201 | } |
206 | } |
|
Line 202... | Line 207... | |||
202 | |
207 | |
|
203 | /*************************************************************************/ |
208 | /*************************************************************************/ |
|
204 | /* Node.JS package export. */ |
209 | /* Node.JS package export. */ |
|
- | 210 | /*************************************************************************/ |
||
205 | /*************************************************************************/ |
211 | if(typeof variable !== 'undefined') { |
|
206 | module.exports.formats = { |
212 | module.exports.formats = { |
|
- | 213 | KeyValueToObject: wasKeyValueToObject |
||
207 | KeyValueToObject: wasKeyValueToObject |
214 | }; |
|
- | 215 | } |
||
208 | }; |
216 | |
|
209 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
217 | /* Copyright (C) 2017 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
210 | /*************************************************************************/ |
218 | /*************************************************************************/ |
|
211 | /* fuss/lambda_calculus/functional_programming/aggregators @ grimore.org */ |
219 | /* fuss/lambda_calculus/functional_programming/aggregators @ grimore.org */ |
|
212 | /*************************************************************************/ |
220 | /*************************************************************************/ |
|
Line 246... | Line 254... | |||
246 | } |
254 | } |
|
Line 247... | Line 255... | |||
247 | |
255 | |
|
248 | /*************************************************************************/ |
256 | /*************************************************************************/ |
|
249 | /* Node.JS package export. */ |
257 | /* Node.JS package export. */ |
|
- | 258 | /*************************************************************************/ |
||
250 | /*************************************************************************/ |
259 | if(typeof variable !== 'undefined') { |
|
251 | module.exports.lambda = { |
260 | module.exports.lambda = { |
|
- | 261 | switch: wasSwitch |
||
252 | switch: wasSwitch |
262 | }; |
|
Line 253... | Line 263... | |||
253 | }; |
263 | } |
|
254 | |
264 | |
|
255 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
265 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
256 | /*************************************************************************/ |
266 | /*************************************************************************/ |
|
Line 261... | Line 271... | |||
261 | } |
271 | } |
|
Line 262... | Line 272... | |||
262 | |
272 | |
|
263 | /*************************************************************************/ |
273 | /*************************************************************************/ |
|
264 | /* Node.JS package export. */ |
274 | /* Node.JS package export. */ |
|
- | 275 | /*************************************************************************/ |
||
265 | /*************************************************************************/ |
276 | if(typeof variable !== 'undefined') { |
|
266 | module.exports.mathematics = { |
277 | module.exports.mathematics = { |
|
- | 278 | MapValueToRange: wasMapValueToRange |
||
267 | MapValueToRange: wasMapValueToRange |
279 | }; |
|
Line 268... | Line 280... | |||
268 | }; |
280 | } |
|
269 | |
281 | |
|
270 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
282 | /* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
|
271 | /*************************************************************************/ |
283 | /*************************************************************************/ |
|
Line 299... | Line 311... | |||
299 | |
311 | |
|
Line 300... | Line 312... | |||
300 | |
312 | |
|
301 | |
313 | |
|
302 | |
314 | |
|
- | 315 | |
||
303 | |
316 | |
|
304 | |
317 | |
|
305 | |
318 | |
|
- | 319 | |
||
306 | |
320 | |