<commit_before>'use strict';
import './components/Redoc/redoc-initial-styles.css';

import { enableProdMode } from '@angular/core';
import { Redoc } from './components/index';
import { SpecManager } from './utils/SpecManager';
import { BrowserDomAdapter as DOM } from './utils/browser-adapter';
import { disableDebugTools } from '@angular/platform-browser';
import { bootstrapRedoc } from './bootstrap';

if (IS_PRODUCTION) {
  disableDebugTools();
  enableProdMode();
}

export const version = LIB_VERSION;

var moduleRef;
export function init(specUrl:string, options?) {
  if (moduleRef) {
    destroy();
  }

  Redoc._preOptions = options;
  options.specUrl = options.specUrl || specUrl;

  Redoc.showLoadingAnimation();
  return SpecManager.instance().load(specUrl)
  .then(() => {
    return bootstrapRedoc();
  })
  .then(appRef => {
    Redoc.hideLoadingAnimation();
    moduleRef = appRef;
    console.log('ReDoc initialized!');
  }).catch(err => {
    Redoc.hideLoadingAnimation();
    Redoc.displayError(err);<commit_msg>default value for options<commit_after>'use strict';
import './components/Redoc/redoc-initial-styles.css';

import { enableProdMode } from '@angular/core';
import { Redoc } from './components/index';
import { SpecManager } from './utils/SpecManager';
import { BrowserDomAdapter as DOM } from './utils/browser-adapter';
import { disableDebugTools } from '@angular/platform-browser';
import { bootstrapRedoc } from './bootstrap';

if (IS_PRODUCTION) {
  disableDebugTools();
  enableProdMode();
}

export const version = LIB_VERSION;

var moduleRef;
export function init(specUrl:string, options:any = {}) {
  if (moduleRef) {
    destroy();
  }

  Redoc._preOptions = options;
  options.specUrl = options.specUrl || specUrl;

  Redoc.showLoadingAnimation();
  return SpecManager.instance().load(specUrl)
  .then(() => {
    return bootstrapRedoc();
  })
  .then(appRef => {
    Redoc.hideLoadingAnimation();
    moduleRef = appRef;
    console.log('ReDoc initialized!');
  }).catch(err => {
    Redoc.hideLoadingAnimation();
    Redoc.displayError(err);
{'fraction_non_alphanumeric': 0.1484149855907781, 'fraction_numerical': 0.0, 'mean_word_length': 4.452879581151833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1941759', 'n_tokens_mistral': 637, 'n_tokens_neox': 623, 'n_words': 136}