1.0.0 • Published 11 years ago
is-spdx-license-id v1.0.0
is-spdx-license-id
Check if the string is one of the SPDX license identifiers
isSpdxLicenseId('MIT'); //=> true
isSpdxLicenseId('zlib-acknowledgement'); //=> true
isSpdxLicenseId('foo-bar-baz'); //=> falseInstallation
Package managers
npm
npm install is-spdx-license-idBower
bower install is-spdx-license-idDuo
var isSpdxLicenseId = require('shinnn/is-spdx-license-id.js');Standalone
Download the script file and its dependency.
API
isSpdxLicenseId(string)
string: String
Return: Boolean
It returns true when the argument is one of the SPDX license identifiers, such as 'MIT' and 'BSD-4-Clause'. Otherwise it returns false.
License
Copyright (c) 2014 - 2015 Shinnosuke Watanabe
Licensed under the MIT License.