UNPKG

737 BSource Map (JSON)View Raw
1{"version":3,"file":"copyMetaData.js","sourceRoot":"","sources":["../src/utils/copyMetaData.ts"],"names":[],"mappings":";;AAAA,sCAAyC;AAEzC;;;;;GAKG;AACH,sBAA6B,EAAO,EAAE,IAAS;IAC7C,MAAM,CAAC,IAAI,EAAE,UAAC,KAAU,EAAE,GAAW,IAAK,OAAA,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,EAAf,CAAe,CAAC,CAAC;IAE3D,MAAM,CAAC,EAAE,CAAC;AACZ,CAAC;AAJD,oCAIC","sourcesContent":["import forOwn = require('lodash/forOwn');\n\n/**\n * Used to copy over meta data from function to function.\n * If meta data is attached to a function. This can get lost\n * when wrapping functions. This tries to persist that.\n * @private\n */\nexport function copyMetadata(to: any, from: any): any {\n forOwn(from, (value: any, key: string) => to[key] = value);\n\n return to;\n}\n"]}
\No newline at end of file