MaxCDN / osscdn

Free CDN by MaxCDN

Home Page:http://www.osscdn.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

walker should use the data from the author property

XhmikosR opened this issue · comments

An example is the Base64 project

{
  "name": "Base64",
  "filename": "base64.min.js",
  "version": "0.1.3",
  "description": "Base64 encoding and decoding",
  "author": "David Chambers <dc@davidchambers.me>",
  "main": "./base64.js",
  "licenses": [{
    "type": "WTFPL",
    "url": "https://raw.github.com/davidchambers/Base64.js/master/LICENSE"
  }],
  "repository": {
    "type": "git",
    "url": "git://github.com/davidchambers/Base64.js.git"
  },
  "devDependencies": {
    "coffee-script": "1.4.x",
    "mocha": "1.8.x",
    "uglify-js": "2.2.x"
  }
}

In the above example there's no maintainers array so it makes sense to use the author property if it's available.

Hey, do you think we should strip the email, though?

Yeah, we should only use the author.name.

Yeah, we should only use the author.name.

Yes, I did exactly that. There are a couple of formats we need to support. author can be either a string or an object for instance.

In this case the author has included his email within the string (ie. author: "Foo Bar <foo@bar.com>"). What I was asking is that should we strip the email in this case too? Probably just .split(' <')[0] would do for a basic check.

Yes, we shouldn't show the email there.

Thanks!