@yamlresume/core 0.4.0 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -1943,6 +1943,33 @@ declare function isEmptyValue(value: undefined | null | object | string): boolea
1943
1943
  * @returns The object with the specified keys removed
1944
1944
  */
1945
1945
  declare function removeKeysFromObject<T extends object>(obj: T, keysToRemove: (string | number | symbol)[]): T;
1946
+ /**
1947
+ * Tree walker function to collect all possible keys from an object recursively
1948
+ *
1949
+ * This function traverses an object tree and collects all property keys at any
1950
+ * depth. It handles arrays, nested objects, and prevents infinite loops from
1951
+ * circular references.
1952
+ *
1953
+ * @param obj - The object to walk through
1954
+ * @param keys - Set to collect all keys (optional, used for recursion)
1955
+ * @param visited - Set to track visited objects to prevent circular references
1956
+ * (optional, used for recursion)
1957
+ * @returns Set containing all keys found in the object tree
1958
+ *
1959
+ * @example
1960
+ * ```typescript
1961
+ * const obj = {
1962
+ * a: 1,
1963
+ * b: {
1964
+ * c: 2,
1965
+ * d: [{ e: 3 }]
1966
+ * }
1967
+ * }
1968
+ * const keys = collectAllKeys(obj)
1969
+ * // keys will contain: Set(['a', 'b', 'c', 'd', 'e'])
1970
+ * ```
1971
+ */
1972
+ declare function collectAllKeys(obj: unknown, keys?: Set<string | number | symbol>, visited?: WeakSet<object>): Set<string | number | symbol>;
1946
1973
 
1947
1974
  /**
1948
1975
  * MIT License
@@ -1999,4 +2026,4 @@ declare function joinNonEmptyString(codes: string[], separator?: string): string
1999
2026
  */
2000
2027
  declare function toCodeBlock(code?: string, lang?: string): string;
2001
2028
 
2002
- export { type Awards, type Basics, type BulletListNode, type Certificates, Country, Degree, type DocNode, type Education, ErrorType, FontSpecNumbersStyle, type Interests, Language, LanguageFluency, type LanguageItem, type Languages, LatexCodeGenerator, LocaleLanguageOption, type Location, MarkdownParser, type Node, type OrderedListNode, type ParagraphNode, type Parser, type ProfileItem, type Profiles, type Projects, type Publications, Punctuation, type References, type Resume, type ResumeContent, type ResumeItem, type ResumeLayout, ResumeTerms, SECTION_IDS, type SectionDefaultValues, type SectionID, SkillLevel, type Skills, type SocialNetwork, type SocialNetworkGroup, TemplateOption, TemplateTerms, type TextNode, TiptapParser, type Volunteer, type Work, YAMLResumeError, defaultResume, defaultResumeContent, defaultResumeLayout, degreeOptions, emptyParagraph, englishCountryNames, epochSecondsToLocaleDateString, escapeLatex, filledResume, filledResumeContent, fontSizeOptions, getDateRange, getLocaleLanguageOptionDetail, getResumeRenderer, getTemplateOptionDetail, getTemplateTranslations, getTermsTranslations, isEmptyString, isEmptyValue, joinNonEmptyString, languageFluenciesOptions, languagesOptions, localizeDate, marginOptions, milliSecondsToSeconds, nowInUTCSeconds, oneDay, parseDate, removeKeysFromObject, resumeItems, showIf, simplifiedChineseCountryNames, skillLevelOptions, spanishCountryNames, toCodeBlock, traditionalChineseCountryHKNames, traditionalChineseCountryTWNames, transformResume };
2029
+ export { type Awards, type Basics, type BulletListNode, type Certificates, Country, Degree, type DocNode, type Education, ErrorType, FontSpecNumbersStyle, type Interests, Language, LanguageFluency, type LanguageItem, type Languages, LatexCodeGenerator, LocaleLanguageOption, type Location, MarkdownParser, type Node, type OrderedListNode, type ParagraphNode, type Parser, type ProfileItem, type Profiles, type Projects, type Publications, Punctuation, type References, type Resume, type ResumeContent, type ResumeItem, type ResumeLayout, ResumeTerms, SECTION_IDS, type SectionDefaultValues, type SectionID, SkillLevel, type Skills, type SocialNetwork, type SocialNetworkGroup, TemplateOption, TemplateTerms, type TextNode, TiptapParser, type Volunteer, type Work, YAMLResumeError, collectAllKeys, defaultResume, defaultResumeContent, defaultResumeLayout, degreeOptions, emptyParagraph, englishCountryNames, epochSecondsToLocaleDateString, escapeLatex, filledResume, filledResumeContent, fontSizeOptions, getDateRange, getLocaleLanguageOptionDetail, getResumeRenderer, getTemplateOptionDetail, getTemplateTranslations, getTermsTranslations, isEmptyString, isEmptyValue, joinNonEmptyString, languageFluenciesOptions, languagesOptions, localizeDate, marginOptions, milliSecondsToSeconds, nowInUTCSeconds, oneDay, parseDate, removeKeysFromObject, resumeItems, showIf, simplifiedChineseCountryNames, skillLevelOptions, spanishCountryNames, toCodeBlock, traditionalChineseCountryHKNames, traditionalChineseCountryTWNames, transformResume };