Browse Source

respond to requested changes

PM-22143-Tools-Refactor-TS-Enums-to-be-const-object-IMPORT-ONLY
John Harrington 2 months ago
parent
commit
93d859f906
No known key found for this signature in database
GPG Key ID: 96217ABBB5514031
  1. 2
      libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts
  2. 31
      libs/importer/src/importers/onepassword/types/onepassword-1pux-importer-types.ts

2
libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts

@ -19,7 +19,7 @@ export class FSecureFskImporter extends BaseImporter implements Importer { @@ -19,7 +19,7 @@ export class FSecureFskImporter extends BaseImporter implements Importer {
for (const [, value] of Object.entries(results.data)) {
const cipher = this.parseEntry(value);
if (cipher != null) {
if (cipher != undefined) {
result.ciphers.push(cipher);
}
}

31
libs/importer/src/importers/onepassword/types/onepassword-1pux-importer-types.ts

@ -56,37 +56,6 @@ export const Category = Object.freeze({ @@ -56,37 +56,6 @@ export const Category = Object.freeze({
*/
export type Category = (typeof Category)[keyof typeof Category];
// const namesByCategory = new Map<Category, keyof typeof Category>(
// Object.entries(Category).map(([key, value]) => [value, key as keyof typeof Category]),
// );
// /**
// * Checks if a value is a valid 1Password Category.
// * @param value - The value to check.
// * @returns True if the value is a valid 1Password Category, false otherwise.
// */
// export function isCategory(value: unknown): value is Category {
// return namesByCategory.has(value as Category);
// }
// /**
// * Converts a value to a 1Password Category if it is valid.
// * @param value - The value to convert.
// * @returns The value as a Category if valid, otherwise undefined.
// */
// export function asCategory(value: unknown): Category | undefined {
// return isCategory(value) ? (value as Category) : undefined;
// }
// /**
// * Gets the name of a 1Password Category value.
// * @param value - The Category value to get the name for.
// * @returns The name of the Category value, or undefined if not found.
// */
// export function nameOfCategory(value: Category): keyof typeof Category | undefined {
// return namesByCategory.get(value);
// }
export interface Item {
uuid: string;
favIndex: number;

Loading…
Cancel
Save