
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
global function 'fn' to sandbox all other definitions
it's recomended to add this code before scripts to ensure compatibility with old browsers
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.5/es5-shim.min.js"></script>
<![endif]-->
<!--[if lt IE 12]>
<script src="//cdnjs.cloudflare.com/ajax/libs/es6-shim/0.21.1/es6-shim.min.js"></script>
<![endif]-->
npm install jengine-fn --save
or
bower install jengine-fn --save
fn.define('moduleName', [ 'dependence_1', 'dependence_2', ..., function ( dependence_1, dependence_1, ...) {
// your code
return definition;
} ]);
fn.define('isLargeString', [ '_', function ( _ ) {
function isLargeString (str) {
return _.isString(str) && str.length > 45;
}
return isLargeString;
} ]);
fn.require(['dependence_1', 'dependence_2'], function ( dependence_1, dependence_1 ) {
// your code
} ]);
or just fn(dependencies || function)
explicit injection mode
fn.run(['dependence_1', 'dependence_2', function ( dependence_1, dependence_1 ) {
// your code
} ]);
implicit injection mode (dependencies will be automatically detected -not recomended when uglifying code- )
fn.run(function ( dependence_1, dependence_1 ) {
// your code
});
fn(function () { console.log('test 1'); });
fn.defer(function () { console.log('test 2'); });
fn(function () { console.log('test 3'); });
output:
test 1
test 3
test 2
FAQs
Basic JS Web Tools
We found that jengine-fn 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.