PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / trunk
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance vtrunk
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / team-updraft / lib-onboarding-wizard / Wizard / Onboarding / src / utils / getNonce.ts

getNonce.ts in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance trunk, at vendor/team-updraft/lib-onboarding-wizard/Wizard/Onboarding/src/utils/getNonce.ts

15 lines 364 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Get nonce for burst api. Add random string so requests don't get cached
3 * @returns {string}
4 */
5 export const getNonce = (nonce: string): string => {
6 return (
7 'nonce=' +
8 nonce +
9 '&token=' +
10 Math.random() // nosemgrep
11 .toString( 36 )
12 .replace( /[^a-z]+/g, '' )
13 .substr( 0, 5 )
14 );
15 };