Class: Spandx::Js::Parsers::Npm
Constant Summary
Constants inherited
from Core::Parser
Core::Parser::UNKNOWN
Instance Method Summary
collapse
for, parse
#all, #each, #inherited, #registry
Instance Method Details
#match?(filename) ⇒ Boolean
7
8
9
|
# File 'lib/spandx/js/parsers/npm.rb', line 7
def match?(filename)
File.basename(filename) == 'package-lock.json'
end
|
#parse(path) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/spandx/js/parsers/npm.rb', line 11
def parse(path)
items = Set.new
each_metadata(path) do |metadata|
items.add(map_from(path, metadata))
end
items
end
|