We definitely need more context to answer this question. However, it may be useful to know that arrays can be converted to strings in some circumstances and perhaps you put yourself in that situation by accident:
Note that the default character used for joining the array is a comma ,
:
var a = ['foo', 'bar'];
console.log(a.toString());
console.log(a + '');
console.log('' + a);
console.log(a.join());
console.log(String(a));
To recover from that, you don't really need Ramda, you could do it in plain JavaScript:
var b = 'foo,bar';
var a = b.split(',');
console.log(a);
If you really wanted Ramda, R.split
would do a similar job:
var splitByComma = R.split(',');
var a = splitByComma('foo,bar');
console.log(a);
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.26.1/ramda.min.js"></script>
References
- String.prototype.split
- R.split