{"size": 810, "ext": "js", "max_stars_repo_path": "source/system/wsh/wshFileSystemObject.js", "max_stars_repo_name": "standard-software/parts.js", "max_stars_repo_stars_event_min_datetime": "2019-09-04T13:37:51.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-09T05:32:23.000Z", "max_issues_repo_path": "source/system/wsh/wshFileSystemObject.js", "max_issues_repo_name": "standard-software/parts.js", "max_issues_repo_issues_event_min_datetime": "2020-04-20T01:13:12.000Z", "max_issues_repo_issues_event_max_datetime": "2020-04-20T01:13:12.000Z", "max_forks_repo_path": "source/system/wsh/wshFileSystemObject.js", "max_forks_repo_name": "standard-software/partsjs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 15, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 22.5, "max_line_length": 77, "alphanum_fraction": 0.7160493827}
import {
  isUndefined, isNull, isNaNStrict,
  isBoolean, isNumber, isInteger, isString,
  isFunction,
  isObject, isObjectNormal, isObjectFromNull,
  isObjectLike, isModule,
  isArray, isArraySeries,
  isDate, isRegExp,
  isBooleanObject, isNumberObject, isStringObject,
  isEmptyObject, isEmptyArray,
} from '../../type/isType.js';

import {
  isWindowsScriptHost,
} from '../../platform/platform.js';

let _fso;

export const FileSystemObject = function() {
  if (!isWindowsScriptHost()) {
    throw new Error('wsh.FileSystemObject can be used only in wsh platform');
  }

  if (!(this instanceof FileSystemObject)) {
    return new FileSystemObject();
  }
  if (isUndefined(_fso)) {
    _fso = new ActiveXObject('Scripting.FileSystemObject');
  }
  return _fso;
};

export default {
  FileSystemObject,
};
