Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

get-func-name.js 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getFuncName = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. 'use strict';
  3. /* !
  4. * Chai - getFuncName utility
  5. * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>
  6. * MIT Licensed
  7. */
  8. /**
  9. * ### .getFuncName(constructorFn)
  10. *
  11. * Returns the name of a function.
  12. * When a non-function instance is passed, returns `null`.
  13. * This also includes a polyfill function if `aFunc.name` is not defined.
  14. *
  15. * @name getFuncName
  16. * @param {Function} funct
  17. * @namespace Utils
  18. * @api public
  19. */
  20. var toString = Function.prototype.toString;
  21. var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
  22. function getFuncName(aFunc) {
  23. if (typeof aFunc !== 'function') {
  24. return null;
  25. }
  26. var name = '';
  27. if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
  28. // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
  29. var match = toString.call(aFunc).match(functionNameMatch);
  30. if (match) {
  31. name = match[1];
  32. }
  33. } else {
  34. // If we've got a `name` property we just use it
  35. name = aFunc.name;
  36. }
  37. return name;
  38. }
  39. module.exports = getFuncName;
  40. },{}]},{},[1])(1)
  41. });