Sha256: f4646d7df4fa488a40f2e7cdac6cdc455e7d40f6db41d0e101b0a2df586d818f
Contents?: true
Size: 516 Bytes
Versions: 1
Compression:
Stored size: 516 Bytes
Contents
module Licensee module Matchers class NpmBower < Licensee::Matchers::Package # While we could parse the package.json or bower.json file, prefer # a lenient regex for speed and security. Moar parsing moar problems. LICENSE_REGEX = / \s*[\"\']license[\"\']\s*\:\s*[\'\"]([a-z\-0-9\.+ ()]+)[\'\"],?\s* /ix.freeze private def license_property match = @file.content.match LICENSE_REGEX match[1].downcase if match && match[1] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
licensee-9.11.0 | lib/licensee/matchers/npm_bower.rb |