a zip code crypto-currency system good for red ONLY

RequireResolveHeaderDependency.js 721B

123456789101112131415161718192021222324252627
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const NullDependency = require("./NullDependency");
  7. class RequireResolveHeaderDependency extends NullDependency {
  8. constructor(range) {
  9. super();
  10. if(!Array.isArray(range)) throw new Error("range must be valid");
  11. this.range = range;
  12. }
  13. }
  14. RequireResolveHeaderDependency.Template = class RequireResolveHeaderDependencyTemplate {
  15. apply(dep, source) {
  16. source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/");
  17. }
  18. applyAsTemplateArgument(name, dep, source) {
  19. source.replace(dep.range[0], dep.range[1] - 1, "/*require.resolve*/");
  20. }
  21. };
  22. module.exports = RequireResolveHeaderDependency;