"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/defaults/index.js" (7 Feb 2017, 277 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var clone = require('clone');
    2 
    3 module.exports = function(options, defaults) {
    4   options = options || {};
    5 
    6   Object.keys(defaults).forEach(function(key) {
    7     if (typeof options[key] === 'undefined') {
    8       options[key] = clone(defaults[key]);
    9     }
   10   });
   11 
   12   return options;
   13 };