
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
Angular-style Dependency Injection for Node.js & the browser.
So, "inject" some fun into your app.
Node.js$ npm install --save pop-it
var pop = require('pop-it');
pop('aPoppy', 'This is it!');
pop(function (aPoppy) {
// aPoppy = 'This is it!'
})();
The Browser<script src="pop-it/browser.js"></script>
pop('shoop', 'a-doop');
pop(function (shoop) {
// shoop = 'a-doop'
})();
A poppy can be any value.
// Num nums.
pop('num', 3);
// Stringilings.
pop('str', 'String!');
// Funkadunks.
pop('fn', function () {
return this;
}, { optional: 'context' });
Assume we registered the above dependencies.
pop(function (num, str, fn) {
// num = 3
// str = 'String!'
// fn() = { optional: 'context' }
})();
Poppies are executed lazily, so your ordering isn't super important. Watch how we register a popped function to a poppy.
// register "b" with the value of a lazily-executed popped function.
pop('b', pop(function (a) {
return a;
}));
pop('a', 'a');
pop(function (b) {
// b() = 'a'
})();

Copyright (c) 2014 Stephen Sawchuk. Licensed under the MIT license.
FAQs
Pop dependencies into your functions.
We found that pop-it 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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.