/*! * define-property <https://github.com/jonschlinkert/define-property> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */'use strict';varisDescriptor=require('is-descriptor');module.exports=functiondefineProperty(obj,prop,val){if(typeofobj!=='object'&&typeofobj!=='function'){thrownewTypeError('expected an object or function.');}if(typeofprop!=='string'){thrownewTypeError('expected `prop` to be a string.');}if(isDescriptor(val)&&('set'inval||'get'inval)){returnObject.defineProperty(obj,prop,val);}returnObject.defineProperty(obj,prop,{configurable:true,enumerable:false,writable:true,value:val});};