Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DUNS number generation #1202

Open
import-brain opened this issue Jul 27, 2022 · 5 comments
Open

Add DUNS number generation #1202

import-brain opened this issue Jul 27, 2022 · 5 comments
Labels
c: feature Request for new feature m: company Something is referring to the company module p: 1-normal Nothing urgent s: waiting for user interest Waiting for more users interested in this feature
Milestone

Comments

@import-brain
Copy link
Member

Clear and concise description of the problem

DUNS (Data Universal Numbering System) numbers are unique, nine-digit codes that helps identify businesses. Users of the system include Apple, the US government, the UN, and more. These numbers are standardized worldwide, and it is standard for businesses to have them.

We already have generation for SWIFT codes (banks), IBAN codes (bank accounts), vehicle identification numbers, mongodb object IDs, etc., we should add a company ID generation method. DUNS numbers would be perfect for this, because they are widely used as a public business entity identifier.

I can submit a PR for this issue if it is accepted.

Suggested solution

As DUNS numbers are nine-digit randomly generated numbers, this method can be written as a wrapper around random.numeric.

In the company module, the method should return as follows:

faker.company.duns() // "060704780"
faker.company.duns() // "059501224"

Alternative

No response

Additional context

No response

@import-brain import-brain added c: feature Request for new feature p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision labels Jul 27, 2022
@import-brain import-brain added this to the v7 - Current Major milestone Jul 27, 2022
@xDivisionByZerox
Copy link
Member

What options could be provided for this method?

I was thinking about:

format

Type: 'basic' | 'DUNS+4'
Default: 'basic'
Description: Defines the results format.

Description for 'basic': A basic 9-digit DUNS string.
Example for 'basic': '192837465'.

Description for 'DUNS+4': A 9-digit DUNS string with four extra alphanumeric characters at the end.
Example for 'DUNS+4': '192837465LJ20'

readable

Type: boolean
Default: false
Description: Defines if the results should be easier readable for humans.

Example for false: '192837465'.
Example for true: '19-283-7465'

@ST-DDT
Copy link
Member

ST-DDT commented Jul 27, 2022

Waiting for user interest.

@import-brain
Copy link
Member Author

What options could be provided for this method?

I was thinking about:

format

Type: 'basic' | 'DUNS+4' Default: 'basic' Description: Defines the results format.

Description for 'basic': A basic 9-digit DUNS string. Example for 'basic': '192837465'.

Description for 'DUNS+4': A 9-digit DUNS string with four extra alphanumeric characters at the end. Example for 'DUNS+4': '192837465LJ20'

readable

Type: boolean Default: false Description: Defines if the results should be easier readable for humans.

Example for false: '192837465'. Example for true: '19-283-7465'

For the readable option, how would we split the number? The Wikipedia doesn't say how to split it. Because the number is usually 9 digits, I think we should split it "3-3-3", like this: 491-571-583. If it is a DUNS+4 number, I think it should be split "3-3-3-4", like this: 491-571-583-F1U7.

@xDivisionByZerox xDivisionByZerox added the m: company Something is referring to the company module label Jul 29, 2022
@ageddesi
Copy link

ageddesi commented Sep 2, 2022

Would love to look at contributing by adding this when the interest is there

@ST-DDT ST-DDT added s: waiting for user interest Waiting for more users interested in this feature and removed s: needs decision Needs team/maintainer decision labels Sep 2, 2022
@ST-DDT ST-DDT modified the milestones: v7 - Current Major, vFuture Sep 8, 2022
@ST-DDT ST-DDT added s: waiting for user interest Waiting for more users interested in this feature and removed s: waiting for user interest Waiting for more users interested in this feature labels May 5, 2023
@github-actions
Copy link

github-actions bot commented May 5, 2023

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

  • If you would like to see this feature be implemented, please react to the description with an up-vote (:+1:).
  • If you have a suggestion or want to point out some special cases that need to be considered, please leave a comment, so we are aware about them.

We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements.

We will start the implementation based on:

  • the number of votes (:+1:) and comments
  • the relevance for the ecosystem
  • availability of alternatives and workarounds
  • and the complexity of the requested feature

We do this because:

  • There are plenty of languages/countries out there and we would like to ensure that every method can cover all or almost all of them.
  • Every feature we add to faker has "costs" associated to it:
    • initial costs: design, implementation, reviews, documentation
    • running costs: awareness of the feature itself, more complex module structure, increased bundle size, more work during refactors

View more issues which are waiting for user interest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: company Something is referring to the company module p: 1-normal Nothing urgent s: waiting for user interest Waiting for more users interested in this feature
Projects
No open projects
Status: No status
Development

No branches or pull requests

4 participants