function mode2permission (mode) {
  const str = mode.toString(8)
  const len = str.length
  const perms = str.slice(len - 3, len).split('')
  const permNames = [
    'owner',
    'group',
    'other'
  ]
  return permNames.map((name, i) => {
    return {
      name,
      permission: digit2permission(perms[i])
    }
  })
}
mode to permission
@param {number}  mode
@return {array}