How to use the seed function from shortid

Find comprehensive JavaScript shortid.seed code examples handpicked from public code repositorys.

3
4
5
6
7
8
9
10
11
12
13
/**
 * Make any changes you need to make to the database here
 */
async function up () {
  try {
    shortid.seed(Math.random())
    let users = await user.model.find()


    await Promise.all(users.map(async user => {
      if (!user.id) {
fork icon0
star icon0
watch icon0