MCPcopy Create free account
hub / github.com/reactjs/react-rails / asciiToBytes

Function asciiToBytes

lib/assets/javascripts/JSXTransformer.js:1726–1733  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1724}
1725
1726function asciiToBytes (str) {
1727 var byteArray = []
1728 for (var i = 0; i < str.length; i++) {
1729 // Node's code seems to be doing this and not & 0x7F..
1730 byteArray.push(str.charCodeAt(i) & 0xFF)
1731 }
1732 return byteArray
1733}
1734
1735function utf16leToBytes (str, units) {
1736 var c, hi, lo

Callers 1

asciiWriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected