accessor-fn.js 727 B

123456789101112131415161718192021
  1. // Version 1.3.1 accessor-fn - https://github.com/vasturiano/accessor-fn
  2. (function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  4. typeof define === 'function' && define.amd ? define(factory) :
  5. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.accessorFn = factory());
  6. }(this, (function () { 'use strict';
  7. var index = (function (p) {
  8. return p instanceof Function ? p // fn
  9. : typeof p === 'string' ? function (obj) {
  10. return obj[p];
  11. } // property name
  12. : function (obj) {
  13. return p;
  14. };
  15. }); // constant
  16. return index;
  17. })));
  18. //# sourceMappingURL=accessor-fn.js.map