react-native-onyx 1.0.120 → 1.0.121

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.
package/lib/Logger.js CHANGED
@@ -28,8 +28,4 @@ function logInfo(message) {
28
28
  logger({message: `[Onyx] ${message}`, level: 'info'});
29
29
  }
30
30
 
31
- export {
32
- registerLogger,
33
- logInfo,
34
- logAlert,
35
- };
31
+ export {registerLogger, logInfo, logAlert};
package/lib/MDTable.js CHANGED
@@ -24,17 +24,16 @@ class MDTable extends AsciTable {
24
24
  toString() {
25
25
  // Ignore modifying the first |---| for titled tables
26
26
  let idx = this.getTitle() ? -2 : -1;
27
- const ascii = super.toString()
28
- .replace(/-\|/g, () => {
29
- /* we replace "----|" with "---:|" to align the data to the right in MD */
30
- idx++;
27
+ const ascii = super.toString().replace(/-\|/g, () => {
28
+ /* we replace "----|" with "---:|" to align the data to the right in MD */
29
+ idx++;
31
30
 
32
- if (idx < 0 || this.leftAlignedCols.includes(idx)) {
33
- return '-|';
34
- }
31
+ if (idx < 0 || this.leftAlignedCols.includes(idx)) {
32
+ return '-|';
33
+ }
35
34
 
36
- return ':|';
37
- });
35
+ return ':|';
36
+ });
38
37
 
39
38
  // strip the top and the bottom row (----) to make an MD table
40
39
  const md = ascii.split('\n').slice(1, -1).join('\n');
@@ -52,16 +51,14 @@ class MDTable extends AsciTable {
52
51
  * @param {Array} [options.rows] The table can be initialized with row. Rows can also be added by `addRow`
53
52
  * @returns {MDTable}
54
53
  */
55
- MDTable.factory = ({
56
- title, heading, leftAlignedCols = [], rows = [],
57
- }) => {
54
+ MDTable.factory = ({title, heading, leftAlignedCols = [], rows = []}) => {
58
55
  const table = new MDTable({title, heading, rows});
59
56
  table.leftAlignedCols = leftAlignedCols;
60
57
 
61
58
  /* By default we want everything aligned to the right as most values are numbers
62
- * we just override the columns that are not right aligned */
59
+ * we just override the columns that are not right aligned */
63
60
  heading.forEach((name, idx) => table.setAlign(idx, AsciTable.RIGHT));
64
- leftAlignedCols.forEach(idx => table.setAlign(idx, AsciTable.LEFT));
61
+ leftAlignedCols.forEach((idx) => table.setAlign(idx, AsciTable.LEFT));
65
62
 
66
63
  return table;
67
64
  };
package/lib/Onyx.d.ts CHANGED
@@ -244,10 +244,7 @@ declare function clear(keysToPreserve?: OnyxKey[]): Promise<void>;
244
244
  * @param collectionKey e.g. `ONYXKEYS.COLLECTION.REPORT`
245
245
  * @param collection Object collection keyed by individual collection member keys and values
246
246
  */
247
- declare function mergeCollection<TKey extends CollectionKeyBase, TMap>(
248
- collectionKey: TKey,
249
- collection: Collection<TKey, TMap, NullishDeep<KeyValueMapping[TKey]>>,
250
- ): Promise<void>;
247
+ declare function mergeCollection<TKey extends CollectionKeyBase, TMap>(collectionKey: TKey, collection: Collection<TKey, TMap, NullishDeep<KeyValueMapping[TKey]>>): Promise<void>;
251
248
 
252
249
  /**
253
250
  * Insert API responses and lifecycle data into Onyx