extract common helper
simplify logic for extracting license from NPM and Bower packages specs
Make helper into a class method

Because it's a pure function.