How to use the sync function from touch

Find comprehensive JavaScript touch.sync code examples handpicked from public code repositorys.

156
157
158
159
160
161
162
163
164
165
166
167
      sanitize(datestr + '-' + note.title + '-' + note._id.substr(5)) + '.html'
    const filePath = path.join(pathToSave, fileName)
    const outputHtml = await generateHtml(note, { pathToSave })


    fs.writeFileSync(filePath, outputHtml, 'utf-8')
    touch.sync(filePath, { time: new Date(note.updatedAt) })
  }
}


async function generateHtml(note, opts = {}) {
fork icon0
star icon1
watch icon2

+ 7 other calls in file

173
174
175
176
177
178
179
180
181
182
      .replace(config.S3_CLOUD_URL, "")
      .replace(config.master_url + "/media/preview/", "")
);

//create lock
// touch.sync(localfile + '.lock');
edit.files_in_use.push(localfile);

//if no file
var lockfile = localfile + "." + uuid() + ".lock";
fork icon0
star icon0
watch icon4

+ 2 other calls in file