How to use unique-names-generator - 6 common examples

To help you get started, we’ve selected a few unique-names-generator 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 chainify / nolik / web / store / Contacts.js View on Github external
generateName() {
    const name = uniqueNamesGenerator({
      length: 2,
      separator: ' ',
    });
    // const camelized = this.camelize(name);
    // return camelized;
    return 'Unknown sender';
  }
github nos / client / src / renderer / shared / wallet / WalletHelpers.js View on Github external
coinType, // coinType is required
  canDelete = true,
  index = DEFAULT_ACC_INDEX,
  net = DEFAULT_NET,
  account = 0,
  change = 0,
  walletLabel,
  publicKey,
  isImport = false
}) => {
  if (!coinType) {
    throw new Error('coinType is required.');
  }
  const storageWallet = {
    walletId: uuid(),
    walletLabel: walletLabel || uniqueNamesGenerator(config),
    canDelete,
    isHardware,
    index,
    coinType,
    account,
    change,
    net,
    isImport,
    publicKey // present with hardware wallets
  };

  return storageWallet;
};
github influxdata / influxdb / ui / src / dashboards / utils / RagnarokActionParametersForm.tsx View on Github external
function generateInstanceName () {
    const instanceName: string = uniqueNamesGenerator({
        dictionaries: [colors,adjectives, animals],
        separator: '-'
      });
  
      console.log('instance name',instanceName)
      return instanceName
}
github dyc3 / opentogethertube / roommanager.js View on Github external
onConnectionReceived(ws, req) {
		if (!req.session.username) {
			let username = uniqueNamesGenerator();
			console.log("Generated name for new user (on connect):", username);
			req.session.username = username;
			req.session.save();
		}
		let client = {
			session: req.session,
			socket: ws,
		};
		this.clients.push(client);
		ws.on('message', (message) => {
			this.onMessageReceived(client, JSON.parse(message));
		});
		this.sendRoomEvent(new RoomEvent(this.name, ROOM_EVENT_TYPE.JOIN_ROOM, client.session.username, {}));
	}
github brigadecore / brigade / examples / 11-kitchen-sink / .brigade / brigade.ts View on Github external
function newJobName(): string {
  return uniqueNamesGenerator({
    dictionaries: [adjectives, animals],
    length: 2,
    separator: "-"
  })
}
github adobe / athena / src / cluster / index.js View on Github external
_generateNodeName = () => {
      const newNodeName = uniqueNamesGenerator({
        length: 2,
        separator: '-',
      });

      while (this._isNameUsed(newNodeName)) {
        this._generateNodeName();
      }

      return newNodeName;
    };

unique-names-generator

Generate unique and memorable names

MIT
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis

Popular unique-names-generator functions

Similar packages