Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
node-style require()
s in the browser without a compile step
This module parses the dependency graph of modules at runtime and pre-fetches dependencies using asynchronous XMLHttp in parallel.
First write some node-style require()s:
js/beep.js:
module.exports = 'beepity'
js/boop.js:
module.exports = 'boop!!!'
js/entry.js:
var beep = require('./beep.js');
var boop = require('./boop.js');
var elem = document.getElementById('res');
elem.innerHTML = beep + ' ' + boop;
Now load up "/wreq.js"
and "/js/entry.js"
in some script tags.
The files that you want to load with wreq should be type="text/wreq"
.
You can get wreq.js
from this repository in the root directory.
<script src="/wreq.js"></script>
<script src="/js/entry.js" type="text/wreq"></script>
<div id="res">[]</div>
Now load index.html
. That's it, no compile step and you get node-style
so-called "synchronous" require()
s.
Now let's all stop making those ridiculous arguments that node-style
require()
s necessarily entail synchronous XHR or a server-side build step
or other silliness.
Copy wreq.js
or wreq.min.js
into your project. All done.
MIT/X11
FAQs
node-style require()s in the browser without a compile step
The npm package wreq receives a total of 2 weekly downloads. As such, wreq popularity was classified as not popular.
We found that wreq demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.