Skip to content

generateLicense

Returns text in a specific license format based on the author information of the given argument. The argument uses the Object type.

Parameters

NameTypeRequiredDefault
optionsLicenseOption
LicenseOption
NameTypeRequiredDefault
authorstring
emailstring
yearStartstring | number
yearEndstring
htmlBrboolean
type'mit' | 'apache20' | 'bsd3'

Returns

string

Examples

javascript
generateLicense({
	type: 'mit',
	holder: '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
)

Released under the MIT License