lib/licensed/source/npm.rb
# Recursively parse dependency JSON data.  Returns a hash mapping the
# package name to it's metadata
Recursively parse dependency JSON data.  Returns a hash mapping the
package name to it's metadata
Recursively parse dependency JSON data . Returns a hash mapping the package name to it ' s metadata
def recursive_dependencies(dependencies, result = {})
        dependencies.each do |name, dependency|
          (result[name] ||= []) << dependency
          recursive_dependencies(dependency["dependencies"] || {}, result)
        end
        result
      end
def recursive_dependencies ( dependencies , result = { } ) dependencies . each do | name , dependency | ( result [ name ] ||= [ ] ) << dependency recursive_dependencies ( dependency [ "dependencies" ] || { } , result ) end result end
Recursively parse dependency JSON data.
Recursively parse dependency JSON data .
dependencies
result