Skip to content

Add DUNS number generation #1202

@ejcheng

Description

@ejcheng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: featureRequest for new featurem: companySomething is referring to the company modulep: 1-normalNothing urgents: waiting for user interestWaiting for more users interested in this feature

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions