MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / string2binary

Function string2binary

static/plugins/jszip/jszip.js:3052–3060  ·  view source on GitHub ↗

* Convert a string that pass as a "binary string": it should represent a byte * array but may have > 255 char codes. Be sure to take only the first byte * and returns the byte array. * @param {String} str the string to transform. * @return {Array|Uint8Array} the string in a binary format.

(str)

Source from the content-addressed store, hash-verified

3050 * @return {Array|Uint8Array} the string in a binary format.
3051 */
3052function string2binary(str) {
3053 var result = null;
3054 if (support.uint8array) {
3055 result = new Uint8Array(str.length);
3056 } else {
3057 result = new Array(str.length);
3058 }
3059 return stringToArrayLike(str, result);
3060}
3061
3062/**
3063 * Create a new blob with the given content and the given type.

Callers 1

jszip.jsFile · 0.85

Calls 1

stringToArrayLikeFunction · 0.85

Tested by

no test coverage detected