kopia lustrzana https://github.com/backface/turtlestitch
CSV: `Array.from` which a more Unicode friendly form of `split()`.
rodzic
c67df0ad87
commit
665c2d6e3b
|
@ -922,7 +922,7 @@ List.prototype.asCSV = function () {
|
||||||
|
|
||||||
var items = this.itemsArray(),
|
var items = this.itemsArray(),
|
||||||
rows = [];
|
rows = [];
|
||||||
|
|
||||||
function encodeCell(atomicValue) {
|
function encodeCell(atomicValue) {
|
||||||
var string = isNil(atomicValue) ? '' : atomicValue.toString(),
|
var string = isNil(atomicValue) ? '' : atomicValue.toString(),
|
||||||
cell;
|
cell;
|
||||||
|
@ -932,7 +932,7 @@ List.prototype.asCSV = function () {
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
cell = ['\"'];
|
cell = ['\"'];
|
||||||
string.split('').forEach(letter => {
|
Array.from(string).forEach(letter => {
|
||||||
cell.push(letter);
|
cell.push(letter);
|
||||||
if (letter === '\"') {
|
if (letter === '\"') {
|
||||||
cell.push(letter);
|
cell.push(letter);
|
||||||
|
@ -1094,7 +1094,7 @@ List.prototype.blockify = function (limit = 500, count = [0]) {
|
||||||
|
|
||||||
block.isDraggable = true;
|
block.isDraggable = true;
|
||||||
slots.removeInput();
|
slots.removeInput();
|
||||||
|
|
||||||
// fill the slots with the data
|
// fill the slots with the data
|
||||||
for (i = 0; i < len && count[0] < limit; i += 1) {
|
for (i = 0; i < len && count[0] < limit; i += 1) {
|
||||||
value = this.at(i + 1);
|
value = this.at(i + 1);
|
||||||
|
|
Ładowanie…
Reference in New Issue