MCPcopy Index your code
hub / github.com/autoNumeric/autoNumeric / randomString

Method randomString

src/AutoNumericHelper.js:1235–1239  ·  view source on GitHub ↗

* Generate a random string. * cf. http://stackoverflow.com/a/8084248/2834898 * * @param {Number} [strLength=5] Length of the generated string (in character count, optional, default: 5) * @returns {string}

(strLength = 5)

Source from the content-addressed store, hash-verified

1233 * @returns {string}
1234 */
1235 static randomString(strLength = 5) {
1236 return Math.random()
1237 .toString(36)
1238 .substring(2, 2 + strLength);
1239 }
1240
1241 /**
1242 * Return the DOM element when passed either a DOM element or a selector string.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected