Description
Format supplied package-person fields as a name, email and URL string.
Development metadata distinguishes source-map deltas, package-person formatting, executable shorthand and Git object modes. A string with package-like syntax need not satisfy the complete registry or package contract. Formatting a person, extracting a command name or mapping a mode does not inspect files or modify a repository.
Format supplied package-person fields as a name, email and URL string.
When to use this tool
Use Package JSON Person String Fields when you already have name, email, url and need to format supplied package-person fields as a name, email and URL string.
How to use the tool and how it works
- Enter name, email, url. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read personString. Use the output convention below.
Require name nonempty; forbid angle brackets, parentheses, CR and LF in every field. Append nonempty email as an angle-bracket field and nonempty URL in parentheses.1
Person metadata can use a combined name, email and URL string. This formatter only constructs that representation and does not verify the contact fields or package metadata.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| name | Name | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192. |
| Optional empty text; delimiters and line breaks are screened but email syntax is not validated. | Required. Text; maximum UTF-16 length 8192. | |
| url | Optional empty text; no URL parsing or endpoint check. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| personString | Person String | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"name": "A. Maintainer",
"email": "a@example.test",
"url": "https://example.test"
},
"output": {
"personString": "A. Maintainer \u003ca@example.test> (https://example.test)"
}
} Limitations and assumptions
- Spaces and many other characters are accepted. No email, URL, person, npm metadata schema, package ownership or contact information is validated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Validate the full source map, package metadata or Git object when conformance matters. Use the relevant complete format and actual file/object information; a local delta or grammar check does not establish a valid package, executable, source mapping or tree entry.
References
Similar or alternative tools
- Package JSON Bin Shorthand Normalizer
Extract a command name and path from restricted package-name shorthand.
- Git Tree Mode Object Kind
Map one recognized Git tree mode to its object kind.