Skip to content

Commit

Permalink
fix for @typhonjs-utils/object
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonrt committed Dec 27, 2021
1 parent ab568f7 commit 999fa89
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 52 deletions.
2 changes: 1 addition & 1 deletion _dist/application/TJSDialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DialogShell } from '@typhonjs-fvtt/svelte/component/core';
import { safeAccess, safeSet } from '@typhonjs-utils/object';
import { safeAccess, safeSet } from '@typhonjs-fvtt/svelte/util';

import { SvelteApplication } from './SvelteApplication.js';

Expand Down
20 changes: 1 addition & 19 deletions _dist/plugin/system/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _dist/plugin/system/index.js.map

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions _dist/store/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _dist/store/index.js.map

Large diffs are not rendered by default.

26 changes: 21 additions & 5 deletions _dist/util/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ declare function hasSetter(component: any, accessor: string): boolean;
* @returns {boolean} Whether the component is a ApplicationShell or TJSApplicationShell.
*/
declare function isApplicationShell(component: any): boolean;
/**
* Provides common object manipulation utilities including depth traversal, obtaining accessors, safely setting values /
* equality tests, and validation.
*/
/**
* Tests for whether an object is iterable.
*
* @param {object} object - An object.
*
* @returns {boolean} Whether object is iterable.
*/
declare function isIterable(object: object): boolean;
/**
* Tests for whether an object is async iterable.
*
* @param {object} object - An object.
*
* @returns {boolean} Whether object is async iterable.
*/
declare function isIterableAsync(object: object): boolean;
/**
* Provides basic duck typing to determine if the provided function is a constructor function for a Svelte component.
*
Expand Down Expand Up @@ -63,10 +83,6 @@ declare function outroAndDestroy(instance: any): Promise<any>;
* @returns {object} The processed Svelte config object.
*/
declare function parseSvelteConfig(config: object, thisArg?: any): object;
/**
* Provides common object manipulation utilities including depth traversal, obtaining accessors, safely setting values /
* equality tests, and validation.
*/
/**
* Provides a way to safely access an objects data / entries given an accessor string which describes the
* entries to walk. To access deeper entries into the object format the accessor string with `.` between entries
Expand Down Expand Up @@ -102,4 +118,4 @@ declare function safeAccess(data: object, accessor: string, defaultValue?: any):
*/
declare function safeSet(data: object, accessor: string, value: any, operation?: string, createMissing?: boolean): boolean;

export { hasAccessor, hasGetter, hasSetter, isApplicationShell, isSvelteComponent, outroAndDestroy, parseSvelteConfig, safeAccess, safeSet };
export { hasAccessor, hasGetter, hasSetter, isApplicationShell, isIterable, isIterableAsync, isSvelteComponent, outroAndDestroy, parseSvelteConfig, safeAccess, safeSet };
30 changes: 29 additions & 1 deletion _dist/util/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _dist/util/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/application/TJSDialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DialogShell } from '@typhonjs-fvtt/svelte/component/core';
import { safeAccess, safeSet } from '@typhonjs-utils/object';
import { safeAccess, safeSet } from '@typhonjs-fvtt/svelte/util';

import { SvelteApplication } from './SvelteApplication.js';

Expand Down
2 changes: 1 addition & 1 deletion src/plugin/system/settings/store/TJSGameSettings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TJSGameSettings as GS } from '@typhonjs-fvtt/svelte/store';
import { isIterable } from '@typhonjs-utils/object';
import { isIterable } from '@typhonjs-fvtt/svelte/util';

/**
* @typedef {object} GameSetting - Defines a game setting.
Expand Down
2 changes: 1 addition & 1 deletion src/store/TJSGameSettings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isIterable } from '@typhonjs-utils/object';
import { isIterable } from '@typhonjs-fvtt/svelte/util';
import { get, writable } from 'svelte/store';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from '@typhonjs-svelte/lib/util';

export * from './isApplicationShell.js';

export { safeAccess, safeSet } from "@typhonjs-utils/object";
export { isIterableAsync, isIterable, safeAccess, safeSet } from "@typhonjs-utils/object";

0 comments on commit 999fa89

Please sign in to comment.