react-data-matrix 0.2.0 → 0.3.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.
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.groupObjectsByProp = exports.capitaliseString = exports.capitaliseFirstCharacter = exports.callAll = void 0;
7
- require("core-js/modules/web.dom-collections.iterator.js");
8
- require("core-js/modules/es.regexp.exec.js");
9
- require("core-js/modules/es.string.replace.js");
10
- const groupObjectsByProp = (array, prop) => {
11
- const map = new Map(Array.from(array, obj => [obj[prop], []]));
12
- array.forEach(obj => map.get(obj[prop]).push(obj));
13
- return Array.from(map.values());
14
- };
15
-
16
- // capitalises first character of each word
17
- exports.groupObjectsByProp = groupObjectsByProp;
18
- const capitaliseFirstCharacter = stringValue => stringValue.replace(/\b([a-z\s])/g, string => string.toUpperCase());
19
-
20
- // capitalizes entire word
21
- exports.capitaliseFirstCharacter = capitaliseFirstCharacter;
22
- const capitaliseString = stringValue => stringValue.toUpperCase();
23
- exports.capitaliseString = capitaliseString;
24
- const callAll = function callAll() {
25
- for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
26
- fns[_key] = arguments[_key];
27
- }
28
- return function () {
29
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
30
- args[_key2] = arguments[_key2];
31
- }
32
- return fns.forEach(fn => fn && fn(...args));
33
- };
34
- };
35
- exports.callAll = callAll;