The classic 'one-liner' for 2D pseudo-random values in GLSL. This uses a highp version for improved randomness and better stability across GPUs, see here:
However, the 'classic' lowp version (with no precision specified) is also included here. Some may find it useful for targeted mobile GPUs.
# random = require(glsl-random)...float rnd = random(myVec.xy);
Typically you might use it like so:
gl_FragColor = vec4( vec3( random( gl_FragCoord.xy / resolution.xy ) ), 1.0 );
Requiring the following will give you a function that doesn't specify any precision:
#pragma glslify: random = require(glsl-random/lowp)