DEFAULTS // 
FUNCTION: defaults()
Loads default options for snippet templates.

@returns {Object} default template options
168883
function defaults() {
	var fnames,
		fpath,
		stats,
		out,
		len,
		i;

	fnames = fs.readdirSync( __dirname );
	len = fnames.length;

	out = {};
	for ( i = 0; i < len; i++ ) {
		fpath = path.join( __dirname, fnames[ i ] );
		stats = fs.statSync( fpath );
		if ( stats.isDirectory() ) {
			out[ fnames[ i ] ] = require( fpath + '/defaults.json' );
		}
	}
	return out;
}
704985
function defaults(array, defaults) {

  if(!isArray(array) || !isObject(defaults)) {
    return array;
  }
  //get defaults keys(include nested).
  var keys = deepKeys(defaults);

  array.forEach(function(elm) {
    //loop through all the keys
    keys.forEach(function(key) {
      var getter = $parse(key);
      var setter = getter.assign;
      //if it's not exist
      if(isUndefined(getter(elm))) {
        //get from defaults, and set to the returned object
        setter(elm, getter(defaults))
      }
    });
  });

  return array;
}
967548
function normalize(options, templates) {
  // Options override defaults and toc methods.
  var result = _.defaults({}, options, toc, toc.defaults);
  // Remove "core" methods from result object.
  ['defaults', 'process', 'anchorize', 'toc'].forEach(function(prop) {
    delete result[prop];
  });
  // Compile Lodash string templates into functions.
  (templates || []).forEach(function(tmpl) {
    if (typeof result[tmpl] === 'string') {
      result[tmpl] = _.template(result[tmpl]);
    }
  });
  return result;
}
657617
function setDefaults(model, defaults) {
    if (!defaults) { return; }

    _.each(defaults, function (value, key) {
        if (model[key] === undefined) {
            model[key] = value;
        }
    });
}
222245
def defaults(self):
        """"""
        return {k: v.default for k, v in self.options().items()}
1256385
function getConfig(context, options, extendsDefaults) {
  const defaults = getDefaults(context, options);
  const config = $.config(options, defaults, (typeof extendsDefaults !== `boolean`) || extendsDefaults);
  config.metadata = { global: config.metadata, collections: {
    'error-pages': {
      pattern: `**/{500,404}.*`,
      metadata: {
        permalink: false
      }
    }
  }};
  return config;
}
996975
function(profiles) {
			profiles = utils.parseJSON(profiles);
			var snippets = {};
			Object.keys(profiles).forEach(function(syntax) {
				var options = profiles[syntax];
				if (!(syntax in snippets)) {
					snippets[syntax] = {};
				}
				snippets[syntax].profile = normalizeProfile(options);
			});

			this.loadSnippets(snippets);
		}
313451
function defaults (target, src) {
      each(src, function (prop) {
        if (typeof target[prop] === 'undefined') {
          target[prop] = src[prop];
        }
      });
    }
1083187
function (userOptions) {
  var defaultOptions = { ignore: [], collection: null, jekyllStyleLayout: true };

  for (var opt in userOptions) defaultOptions[opt] = userOptions[opt];

  return defaultOptions;
}
398630
function makeDefaultOptions() {
  return {
    baseUrl: "/djedi",
    batchInterval: 10, // ms
    defaultRender: state => {
      switch (state.type) {
        case "loading":
          return "Loading…";
        case "error":
          return `Failed to fetch content 😞 (${
            state.error.response != null ? state.error.response.status : -1
          })`;
        case "success":
          return state.content;
        // istanbul ignore next
        default:
          return null;
      }
    },
    fetch: defaultFetch,
    languages: {
      default: "en-us",
      additional: [],
    },
    uri: {
      defaults: {
        scheme: "i18n",
        namespace: "",
        path: "",
        ext: "txt",
        version: "",
      },
      namespaceByScheme: {
        i18n: "{language}",
        l10n: "local",
        g11n: "global",
      },
      separators: {
        scheme: "://",
        namespace: "@",
        path: "/",
        ext: ".",
        version: "#",
      },
    },
  };
}
915303
function tsLoaderOptions(options = {}) {
  const DefaultTsLoaderOptions = {
    compilerOptions: {
      target: 'ES5',
      sourceMap: true,
      jsx: 'React'
    }
  }

  return {
    loader: 'ts-loader',
    options: Object.assign({}, DefaultTsLoaderOptions, options)
  }
}
1081457
def get_default_layout(template, options)
      source_ext = Renderer.source_extension_for(template.source_path)
      options[:layout][source_ext] if options.key?(:layout)
    end
847532
function defaults(options, defaultOption) {
  options = options || {};
  for (var i in defaultOption) {
    if (own(defaultOption, i) && !(i in options)) options[i] = defaultOption[i];
  }
  return options
}
1312988
function defaultOptions() {
    return {
        optimistic: false,
        directive: false,
        nodejsScope: false,
        impliedStrict: false,
        sourceType: "script",  // one of ['script', 'module']
        ecmaVersion: 5,
        childVisitorKeys: null,
        fallback: "iteration"
    };
}
407293
function html(strings, ...values) {
  let template = templateCache.get(strings);

  if (template === undefined) {
    template = new Template(strings, defaultTemplateProcessor);
    templateCache.set(strings, template);
  }

  return templateResult(template, values);
}
1111625
private function _setDefaults()
    {
        if (!isset(self::$_template))
            self::_initializeDefaults();
        foreach (self::$_template as $k=>$v) {
            if ($k[0] != '_')
                $this->$k = $v;
        }
        return $this;
    }
473201
function (val, opts) {
    if (typeof val === 'function') {
      return new Snippet(val(this));
    }
    if (typeof val === 'string') {
      var str = utils.tryRead(val);
      var res = {content: null, options: opts || {}};
      if (str) {
        res.path = val;
        res.content = str.toString();
      } else {
        res.content = val;
      }
      return new Snippet(res);
    }
    if (val instanceof Snippet) {
      val.option(opts);
      return val;
    }
    if (typeof val === 'object') {
      val.options = extend({}, val.options, opts);
      return new Snippet(val);
    }
  }