MCPcopy
hub / github.com/scality/cloudserver / hasNonPrintables

Function hasNonPrintables

lib/utilities/stringChecks.js:8–13  ·  view source on GitHub ↗

* hasNonPrintables returns whether or not the given value * includes characters that are non-printable. * * @param {string} value - value to check for non-printables * @returns {Boolean} whether or not the value has non-printables

(value)

Source from the content-addressed store, hash-verified

6 * @returns {Boolean} whether or not the value has non-printables
7 */
8function hasNonPrintables(value) {
9 return Array.from(value).some(char => {
10 const codePoint = char.codePointAt(0);
11 return codePoint < 32 || codePoint === 127;
12 });
13}
14
15module.exports = {
16 hasNonPrintables,

Callers 2

objectPutFunction · 0.85
initiateMultipartUploadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected