How to use najax - 4 common examples

To help you get started, we’ve selected a few najax examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joelewis / hnlive / startcron.js View on Github external
interval = setInterval(function() {
                if (! ids.length) {
                    clearInterval(interval);
                    allRequestsSent.resolve(requests);
                    return; 
                }
                var id = ids.shift();
                var dfd = deferred();
                najax.get(itemAPI.replace('{{itemId}}', id), function(resp) {
                        dfd.resolve(JSON.parse(resp));
                });
                requests.push(dfd.promise);
            }, 500);
github joelewis / hnlive / startcron.js View on Github external
var getFrontPageStories = function(cb) {
        najax.get(topStoriesAPI).then(function(resp, status) {
            var top = status === "success" ? JSON.parse(resp) : [];
            var top = top.slice(0, 30);
            cb(top);
        });
    };
github donejs / place-my-order / lib / iso / ajax.js View on Github external
can.ajax = function(args){
    if(typeof args === "string") {
      args = { url: args };
    }

    args.url = base + args.url;
    arguments[0] = args;
    return najax.apply(this, arguments);
  };
github smartscenes / sstk / ssc / stk-ssc.js View on Github external
STK.util.post = function(opts) {
  opts = STK.util.__prepareAjaxOpts(opts);
  return najax.post(opts);
};
STK.util.param = require('jquery-param');

najax

jquery ajax-stye http requests in node

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Popular najax functions