Skip to content

refactor(util): add shared helpers for cross-repo dedup#2770

Draft
goastler wants to merge 2 commits into
mainfrom
dedupe-duplicate-functions
Draft

refactor(util): add shared helpers for cross-repo dedup#2770
goastler wants to merge 2 commits into
mainfrom
dedupe-duplicate-functions

Conversation

@goastler

Copy link
Copy Markdown
Member

Adds shared helpers to @prosopo/util so duplicate copies in downstream repos can be removed:

  • arrayBufferToBase64 (new)
  • hasTouchSupport (new)
  • prependProtocolToUrl (moved into url.ts)
  • exports hammingDistance from the barrel (was missing)

Consumed by captcha-private (catcher, aws-serverless-api, marketing-website) and Protect (protect, telemetry). Dependencies flow downward only (root/Protect → captcha).

Comment on lines +27 to +30
chunk.code = chunk.code.replace(
/exports2\.FILES = \[[\s\S]*?\];/g,
"exports2.FILES = [];\n",
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants