<p>I would like to inject binary data into an object in JavaScript. Is there a way to do this? </p>

<p>i.e.</p>

<pre><code>var binObj = new BinaryObject('101010100101011');
</code></pre>

<p>Something to that effect. Any help would be great.</p>

You can use parseInt:
```
var bin = parseInt('10101010', 2);
```
The second argument (the radix) is the base of the input.