<commit_before>var util = require('util')
var getData = require('./lib/getData')
var apiUrl = 'https://data.ssb.no/api'
var defaults = {
  apiVersion: 'v0',
  format: 'json',
  lang: 'no'
}

module.exports = (options, callback) => {
  if (!options) {
    return callback(new Error('Missing required input: options'), null)
  }

  if (!options.dataset) {
    return callback(new Error('Missing required input: options.dataset'), null)
  }

  var dataset = options.dataset
  var version = options.api || defaults.apiVersion
  var format = options.format || defaults.format
  var lang = options.lang || defaults.lang
  var uri = util.format('%s/%s/dataset/%s.%s', apiUrl, version, dataset, format)
  var qs = {lang: lang}
  var requestOptions = {
    apiUrl: uri,
    qs: qs
  }

  getData(requestOptions, (error, body) => {
    if (error) {<commit_msg>standard --fix (patch)<commit_after>var util = require('util')
var getData = require('./lib/getData')
var apiUrl = 'https://data.ssb.no/api'
var defaults = {
  apiVersion: 'v0',
  format: 'json',
  lang: 'no'
}

module.exports = (options, callback) => {
  if (!options) {
    return callback(new Error('Missing required input: options'), null)
  }

  if (!options.dataset) {
    return callback(new Error('Missing required input: options.dataset'), null)
  }

  var dataset = options.dataset
  var version = options.api || defaults.apiVersion
  var format = options.format || defaults.format
  var lang = options.lang || defaults.lang
  var uri = util.format('%s/%s/dataset/%s.%s', apiUrl, version, dataset, format)
  var qs = { lang: lang }
  var requestOptions = {
    apiUrl: uri,
    qs: qs
  }

  getData(requestOptions, (error, body) => {
    if (error) {
{'fraction_non_alphanumeric': 0.1554646405610754, 'fraction_numerical': 0.0011689070718877848, 'mean_word_length': 3.6395663956639566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1125694', 'n_tokens_mistral': 560, 'n_tokens_neox': 550, 'n_words': 152}