@flareapp/js 2.0.0-rc.1 → 2.0.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,22 +0,0 @@
1
- // https://stackoverflow.com/a/11616993/6374824
2
- export function flatJsonStringify(json: Object): string {
3
- let cache: any = [];
4
-
5
- const flattenedStringifiedJson = JSON.stringify(json, function (_, value) {
6
- if (typeof value === 'object' && value !== null) {
7
- if (cache.indexOf(value) !== -1) {
8
- try {
9
- return JSON.parse(JSON.stringify(value));
10
- } catch (error) {
11
- return;
12
- }
13
- }
14
- cache.push(value);
15
- }
16
- return value;
17
- });
18
-
19
- cache = null;
20
-
21
- return flattenedStringifiedJson;
22
- }
@@ -1,5 +0,0 @@
1
- export function flattenOnce(array: Array<Array<any>>) {
2
- return array.reduce((flat, toFlatten) => {
3
- return flat.concat(toFlatten);
4
- }, []);
5
- }
package/src/util/index.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './assert';
2
- export * from './assertKey';
3
- export * from './assertSolutionProvider';
4
- export * from './flatJsonStringify';
5
- export * from './flattenOnce';
6
- export * from './now';
package/src/util/now.ts DELETED
@@ -1,3 +0,0 @@
1
- export function now(): number {
2
- return Math.round(Date.now() / 1000);
3
- }