Tabnine Logo For Javascript
gun
Code IndexAdd Tabnine to your IDE (free)

How to use gun

Best JavaScript code snippets using gun(Showing top 4 results out of 315)

origin: lmangani/gun-elastic

Gun.node.is(node, function(a,b,c,d) {
      var row = { field: b, soul: d, state: new Date().getTime() };
      if (c[b] instanceof Object ) {
        row.relation = c[b]['#'];
      } else {
        row.value = c[b];
      }
      rows.push(row_insert);
      rows.push(row);
      _debug && console.log(row);
     });
origin: JosePedroDias/serve-gundb

http.createServer(function(req, res){
  if (gun.wsp.server(req, res)) {
    return; // filters gun requests!
  }
  fs.createReadStream(path.join(__dirname, req.url))
  .on('error', function() { // static files!
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end(fs.readFileSync(path.join(__dirname, 'index.html'))); // or default to index
  }).pipe(res); // stream
})
origin: lmangani/gun-elastic

setTimeout(function(){ 
  // access the data as if it is a document.
  gun.get('mark').get('boss').get('name').val(function(data, key){
   // `val` grabs the data once, no subscriptions.
   console.log("Mark's boss is", data);
  });
}, 5000);
origin: lmangani/gun-elastic

setTimeout(function(){ 
  // access the data as if it is a document.
  gun.get('mark').get('boss').get('name').val(function(data, key){
   // `val` grabs the data once, no subscriptions.
   console.log("Mark's boss is", data);
  });
}, 10000);
gun(npm)

JSDoc

A realtime, decentralized, offline-first, graph data synchronization engine.

Most used gun functions

  • ChainReference.get
    Where to read data from.
  • ChainReference.val
  • ChainReference.wsp
  • Constructor.node
  • is

Popular in JavaScript

  • axios
    Promise based HTTP client for the browser and node.js
  • async
    Higher-order functions and common patterns for asynchronous code
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • debug
    small debugging utility
  • request
    Simplified HTTP request client.
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • aws-sdk
    AWS SDK for JavaScript
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now