
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
This is a CommonJS module system, highly compatible with NodeJS, intended for front-end development of web applications using npm style packages. It is designed to be automatically replaced by the Montage Optimizer with a smaller, faster and bundled production module system.
Mr is installed as a package in your application using npm:
$ npm init # if you don't already have a package.json
$ npm install --save mr
In an HTML file next to your package.json
add the Mr script and provide a
module to load:
<script src="node_modules/mr/bootstrap.js" data-module="index"></script>
Start writing your code in index.js
, using the require
function as you
would in Node. Have a look at the demo
for working example.
You can place your package.json
in a different location, or avoid having one
at all, with other script tag attributes.
Take a look at Mop, the Montage Optimizer to optimize applications for production. The optimizer can bundle packages with all of the dependent modules, can preload bundles of progressive enhancements in phases, and can generate HTML5 application cache manifests.
Mr is compatible with Node and npm, although there are some differences.
There is documentation for:
And you may be interested in an in-depth look at how Mr works.
At present, Mr depends on document.querySelector
and
probably several other recent EcmaScript methods that might not be
available in legacy browsers. With your help, I intend to isolate and
fix these bugs.
At time of writing, tests pass in Chrome 21, Safari 5.1.5, and Firefox 13 on Mac OS 10.6.
Tests are in the spec
directory. Use npm test
to run the tests in
PhantomJS or open spec/run.html
in a browser.
This implementation is a part from Motorola Mobility’s Montage web application framework. The module system was written by Tom Robinson and Kris Kowal. Motorola holds the copyright on much of the original content, and provided it as open source under the permissive BSD 3-Clause license. This project is maintained by Kris Kowal and Stuart Knightley, continuing with that license.
FAQs
A refresh-only CommonJS module system for browsers, used in Montage
The npm package mr receives a total of 1,207 weekly downloads. As such, mr popularity was classified as popular.
We found that mr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.