How to use the now.getGroups function in now

To help you get started, we’ve selected a few now 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 tomayac / isearch / server / musebag / cofind.js View on Github external
var hasGroup = function(groupName, callback) {
  now.getGroups(function(groups) {
    for(var index in groups) {
      if(groupName === groups[index]) {
        callback(true);
        return;
      }
    }
    callback(false);
  });
};
github LastRose / nodejs-livechat / livechat / app.js View on Github external
everyone.now.popGroups = function(){
	nowjs.getGroups(function(groups){
		var i = groups.length;
		for(i; i>0;--i){
			nowjs.getGroup(groups[i]).getUsers(function(users){
				var x = admins.length;
				for(x; x>0; --x){
					ind = users.indexOf(admins[x]);
					if(ind != -1){
						users.splice(ind,1);
					}
				}
				if(!users.length){
					groups.splice(i,1);
				}
				undef=groups.indexOf('undefined');
				if(undef != -1){
					groups.splice(undef,1);

now

The command-line interface for Vercel

Apache-2.0
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis