read-json.js
function parseIndex (data) {
  data = data.split(/^\/\*\*package(?:\s|$)/m)

  if (data.length < 2) return null
  data = data[1]
  data = data.split(/\*\*\/$/m)

  if (data.length < 2) return null
  data = data[0]
  data = data.replace(/^\s*\*/mg, '')

  try {
    return safeJSON(data)
  } catch (er) {
    return null
  }
}
function parseIndex (data) {
  data = data.split(/^\/\*\*package(?:\s|$)/m)

  if (data.length < 2) return null
  data = data[1]
  data = data.split(/\*\*\/$/m)

  if (data.length < 2) return null
  data = data[0]
  data = data.replace(/^\s*\*/mg, '')

  try {
    return safeJSON(data)
  } catch (er) {
    return null
  }
}
function parseIndex ( data ) { data = data . split ( / ^\/\*\*package(?:\s|$) / m ) if ( data . length < 2 ) return null data = data [ 1 ] data = data . split ( / \*\*\/$ / m ) if ( data . length < 2 ) return null data = data [ 0 ] data = data . replace ( / ^\s*\* / mg , '' ) try { return safeJSON ( data ) } catch ( er ) { return null } }
/**package { "name": "foo", "version": "1.2.3", ... } *
/ ** package { name : foo version : 1 . 2 . 3 ... } *