Skip to content

feat: make name set iterable - #19

Closed
ralflorent wants to merge 1 commit into
mainfrom
dev
Closed

ralflorent wants to merge 1 commit into
mainfrom
dev

Conversation

@ralflorent

Copy link
Copy Markdown
Owner

Makes the name set iterable (i.e., for-of statements).

This is similar to parts with the exception that all name components are returned as Name classes (instead of their natural form - e.g., FirstName or LastName) to maintain certain homogeneity and consistency across each name piece.

This PR also includes changes to support flexible types instead of being forced to import enums (Separator, NameOrder, etc.) to customize the behavior of the name components via Config. For example, working with names ordered by family name should be as easy as doing this:

import namefully from 'namefully';

const barack = namefully('Obama Barack', { orderedBy: 'lastname' });
console.log(barack.initials({ orderedBy: 'firstname' }); // ['B', 'O']

@ralflorent ralflorent closed this Dec 31, 2025
@ralflorent
ralflorent deleted the dev branch February 6, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant