dce-reactkit 3.1.2 → 3.1.5

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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Given a string, only keep the letters inside it
3
+ * @author Gabe Abrams
4
+ * @param str the string to parse
5
+ * @returns only the letters inside of the string
6
+ */
7
+ const onlyKeepLetters = (str: string): string => {
8
+ return str.replace(/[^a-zA-Z]+/g, '');
9
+ };
10
+
11
+ export default onlyKeepLetters;
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ import PopSuccessMark from './components/PopSuccessMark';
13
13
  import PopFailureMark from './components/PopFailureMark';
14
14
  import PopPendingMark from './components/PopPendingMark';
15
15
  import CopiableBox from './components/CopiableBox';
16
+ import ItemPicker from './components/ItemPicker';
16
17
 
17
18
  // Import errors
18
19
  import ErrorWithCode from './errors/ErrorWithCode';
@@ -45,6 +46,7 @@ import startMinWait from './helpers/startMinWait';
45
46
  import getHumanReadableDate from './helpers/getHumanReadableDate';
46
47
  import getPartOfDay from './helpers/getPartOfDay';
47
48
  import stringsToHumanReadableList from './helpers/stringsToHumanReadableList';
49
+ import onlyKeepLetters from './helpers/onlyKeepLetters';
48
50
 
49
51
  // Import types
50
52
  import ModalButtonType from './types/ModalButtonType';
@@ -72,6 +74,7 @@ export {
72
74
  PopFailureMark,
73
75
  PopPendingMark,
74
76
  CopiableBox,
77
+ ItemPicker,
75
78
  // Global functions
76
79
  alert,
77
80
  confirm,
@@ -100,6 +103,7 @@ export {
100
103
  getHumanReadableDate,
101
104
  getPartOfDay,
102
105
  stringsToHumanReadableList,
106
+ onlyKeepLetters,
103
107
  // Client helpers
104
108
  visitServerEndpoint,
105
109
  // Server helpers