default-args
Version:
A simple function for providing defaults to an options argument. No dependencies, tiny amount of code.
8 lines (7 loc) • 631 B
JavaScript
/*!
* default-args v1.0.1 (https://github.com/victornpb/default-args)
* Copyright (c) victornpb
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).defaults=t()}(this,(function(){"use strict";return function e(t,n){function o(e){return null!==e&&"object"==typeof e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}if(o(n))for(var i in t)f(t,i)&&f(n,i)&&void 0!==n[i]&&(o(t[i])?e(t[i],n[i]):t[i]=n[i]);return t}}));
//# sourceMappingURL=default-args.js.map