Skip to content
Not available in DartThis function is not part of the Dart package. The documentation below is for JavaScript and Python.

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
authorstringstr
emailstringstr
yearStartstring | numberstr | int
yearEndstringstr
htmlBrbooleanbool
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
)

Released under the MIT License