generateLicense
Returns text in a specific license format based on the author information of the given argument. The argument uses the Object type.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
options | LicenseOption | ● | – |
LicenseOption| Name | Type | Required | Default |
|---|---|---|---|
author | stringstr | ● | – |
email | stringstr | – | – |
yearStart | string | numberstr | int | ● | – |
yearEnd | stringstr | – | – |
htmlBr | booleanbool | – | – |
type | 'mit' | 'apache20' | 'bsd3' | ● | – |
Returns
string
str
Examples
javascript
generateLicense({
type: 'mit',
author: 'example',
email: '[email protected]',
yearStart: 2020,
yearEnd: 2021,
htmlBr: true
});python
generateLicense(
type='mit',
author='example',
email='[email protected]',
yearStart=2020,
yearEnd=2021,
htmlBr=True
)