0.2.4 • Published 2 years ago

jsc-safe-url v0.2.4

Weekly downloads
-
License
0BSD
Repository
github
Last release
2 years ago

jsc-safe-url

JavaScriptCore santizes source URLs in error stacks by stripping query strings and fragments. Ref: Webkit/Webkit#49109d.

This package contains utility functions required to implement the proposed React Native Community RFC0646. It exports three functons:

function isJscSafeUrl(url: string): boolean

Returns false if the URL has a query component that could be stripped by JSC.

function toJscSafeUrl(urlToConvert: string): string

Accepts an absolute or relative URL, and encodes any data in the input query string (if present) into the path component of the URL, by using the delimiter //& (which cannot appear in a normalized file path) to separate the original path from the orignal query string.

toJscSafeUrl('https://example.com/path?foo=bar#fragment')
// 'https://example.com/path//&foo=bar#fragment'

function toNormalUrl(urlToNormalize: string): string

Accepts an absolute or relative URL, and replaces the first unescaped //& in the path component with ?. (Effectively the reverse of toJscSafeUrl.)

toNormalUrl('https://example.com/path//&foo=bar#fragment')
// 'https://example.com/path?foo=bar#fragment'
easy-select-rnluminos-ui-core@everything-registry/sub-chunk-1979jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplegriffin-ui-librarytest-zeo-collectvision-camera-plugin-face-detectorvantiq-reactjesh-calculationjordy-frijters-test-libjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwyreact-native-experts-sdktest_lib_module_aarquickcapture_react_nativern-agora-ios-mreact-native-omental-frameworkreact-native-sixdee_test_lib@assystant/firebase@aviinash_jha/react-native-test_multiply@ali5049/react-native-buttons@ajaykewat/myboilerplate@alanastor/robylon-react-native-sdk@brantalikp/rn-resize@adatechnology/react-native-android-getnet-posyarn-react-hook-form@idas1/ui-component-lib@edwinpb/scany@labiebhn_/react-native-multiplier@lehuyaa/my-assets@expo/metro-config@extrieve_technologies/quickcapture_react_native@react-native-ui-design/button@ponchodien/react-native-printer-imin@npm_fluentco/adflow-react-native-sdk@sephriot/react-native-persistable-uri@sridharetikala/react-native-rn-lib-custom-componentsmetroori-bot-react-nativereact-native-android-viewreact-native-dummy-viewreact-native-ctp-odpreact-native-custom-image-carouselreact-native-custom-poccomponentreact-native-custom-poccomponent-nextreact-native-dff-components-demoreact-native-dimensions-layoutreact-native-expo-read-sms-ts-kfreact-native-conekta-card-tokenizerreact-native-components-designreact-native-custome-component-demoreact-native-escapereact-native-module-argereact-native-nativewindreact-native-file-logger-forkedreact-native-ideo-rn-notificationsreact-native-fedlight-dsmreact-native-geo-locatorreact-native-native-audio-enginereact-native-native-ios-test1react-native-mymapreact-native-remote-updatern-horizontal-listrn-check-btnrn-circular-chartrn-keyboard-avoiding-viewrn_unique_device_idreact-native-bottom-tab-designsreact-native-bridge-packagereact-native-app-bubblereact-native-build-vesion-getterreact-native-basic-appreact-native-basic-screenreact-native-adarsh_react_native_video_playerreact-native-bleccs-componentsreact-native-android-native-viewreact-native-awesome-module-dharmeshreact-native-awesome-module-latestreact-native-avinash_jha_test_pluginreact-native-awesome-android-123react-native-awesome-android-123-zeotapreact-native-lowlatencyreact-native-loyalty-platformsreact-native-login-demo-testreact-native-multiplyreact-native-multiselectorreact-native-multiplier-altroncosoreact-native-mun-kitreact-native-mybuttonlibraryreact-native-nyx-printerreact-native-offline-noticereact-native-onramp
0.2.1

2 years ago

0.2.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.4

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago