a zip code crypto-currency system good for red ONLY

estree-walker.umd.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (factory((global.estreeWalker = {})));
  5. }(this, (function (exports) { 'use strict';
  6. function walk ( ast, ref) {
  7. var enter = ref.enter;
  8. var leave = ref.leave;
  9. visit( ast, null, enter, leave );
  10. }
  11. var shouldSkip = false;
  12. var context = { skip: function () { return shouldSkip = true; } };
  13. var childKeys = {};
  14. var toString = Object.prototype.toString;
  15. function isArray ( thing ) {
  16. return toString.call( thing ) === '[object Array]';
  17. }
  18. function visit ( node, parent, enter, leave, prop, index ) {
  19. if ( !node ) { return; }
  20. if ( enter ) {
  21. var _shouldSkip = shouldSkip;
  22. shouldSkip = false;
  23. enter.call( context, node, parent, prop, index );
  24. var skipped = shouldSkip;
  25. shouldSkip = _shouldSkip;
  26. if ( skipped ) { return; }
  27. }
  28. var keys = childKeys[ node.type ] || (
  29. childKeys[ node.type ] = Object.keys( node ).filter( function (key) { return typeof node[ key ] === 'object'; } )
  30. );
  31. for ( var i = 0; i < keys.length; i += 1 ) {
  32. var key = keys[i];
  33. var value = node[ key ];
  34. if ( isArray( value ) ) {
  35. for ( var j = 0; j < value.length; j += 1 ) {
  36. visit( value[j], node, enter, leave, key, j );
  37. }
  38. }
  39. else if ( value && value.type ) {
  40. visit( value, node, enter, leave, key, null );
  41. }
  42. }
  43. if ( leave ) {
  44. leave( node, parent, prop, index );
  45. }
  46. }
  47. exports.walk = walk;
  48. exports.childKeys = childKeys;
  49. Object.defineProperty(exports, '__esModule', { value: true });
  50. })));
  51. //# sourceMappingURL=estree-walker.umd.js.map