'use strict';

var bower = function(str) {
  var deps = JSON.parse(str).dependencies;
  return Object.keys(deps)
  .reduce(function(accum, dep) {
    accum.push([dep, deps[dep]]);
    return accum;
  }, []);
};

module.exports = bower;

'use strict';

var bower = function(str) {
  var json;
  try { json = JSON.parse(str); } catch(err) { return []; }
  var allDeps = Object.assign({}, json.dependencies, json.devDependencies);
  return Object.keys(allDeps)
  .reduce(function(accum, dep) {
    accum.push([dep, allDeps[dep]]);
    return accum;
  }, []);
};

module.exports = bower;

Fix bower devDependenvies