<commit_before>
module.exports = exports = list

exports.usage = 'Prints a listing of the currently installed node development files'

/**
 * Module dependencies.
 */

var fs = require('graceful-fs')
  , path = require('path')
  , log = require('npmlog')

function list (gyp, args, callback) {

  var devDir = gyp.devDir
  log.verbose('list', 'using node-gyp dir:', devDir)

  // readdir() the node-gyp dir
  fs.readdir(devDir, onreaddir)

  function onreaddir (err, versions) {
    if (err && err.code != 'ENOENT') {
      return callback(err)
    }
    if (versions) {
      versions = versions.filter(function (v) { return v != 'current' })
    } else {
      versions = []
    }
    callback(null, versions)
  }
}
<commit_msg>list: use Array.isArray()<commit_after>
module.exports = exports = list

exports.usage = 'Prints a listing of the currently installed node development files'

/**
 * Module dependencies.
 */

var fs = require('graceful-fs')
  , path = require('path')
  , log = require('npmlog')

function list (gyp, args, callback) {

  var devDir = gyp.devDir
  log.verbose('list', 'using node-gyp dir:', devDir)

  // readdir() the node-gyp dir
  fs.readdir(devDir, onreaddir)

  function onreaddir (err, versions) {
    if (err && err.code != 'ENOENT') {
      return callback(err)
    }
    if (Array.isArray(versions)) {
      versions = versions.filter(function (v) { return v != 'current' })
    } else {
      versions = []
    }
    callback(null, versions)
  }
}

{'fraction_non_alphanumeric': 0.14593140551445863, 'fraction_numerical': 0.0, 'mean_word_length': 3.1218836565096955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1616547', 'n_tokens_mistral': 497, 'n_tokens_neox': 490, 'n_words': 132}