Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A custom Streamlit component to evaluate arbitrary Javascript expressions.
SJE is a custom Streamlit component, built to evaluate arbitrary Javascript expressions and return the result. It can become useful in doing certain functionalities which are simple things in JavaScript, but unavailable or difficult to do in Streamlit. Examples include cookie management, writing to clipboard, getting device width (e.g. to check if we are on a mobile device), getting browser language, sharing something through Android's share feature, knowing user agent, etc. See MDN docs for more information about Web APIs.
pip3 install streamlit_js_eval
st.write(f"Screen width is {streamlit_js_eval(js_expressions='screen.width', key = 'SCR')}")
key
is an arbitrary but unique string, required by Streamlit components API for each call to streamlit_js_eval
.
Some more common functionalities are already implemented as Python functions. Examples include:
# Returns user's location after asking for permission when the user clicks the generated link with the given text
location = get_geolocation()
# The URL parts of the page
location_json = get_page_location()
See streamlit_js_eval/__init__.py
for more functions. Check a demo in example.py
or see it live.
if-else
block, ...)FAQs
A custom Streamlit component to evaluate arbitrary Javascript expressions.
We found that streamlit-js-eval demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.