-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot edit code, runs only template #31
Comments
I think the problem is that it won't currently support code written in ES6 (so |
Same problem with code console.log(1)
setTimeout(() => { console.log(2) })
const prom1 = new Promise(resolve => {
console.log(3)
resolve(4)
})
const prom2 = new Promise(resolve => {
console.log(5)
resolve(6)
})
prom1.then(console.log)
prom2.then(console.log)
console.log(7) |
This is a super useful tool that I'm directing newer devs to - any chance you could get it updated to accommodate modern syntax? It also showed up in a course I took, and it was disappointing to see it not work with ES6 code. |
Doesnt work with this code as well. Looks like its unable to locate the document. @latentflip Can you please accommodate the corrections? // JS
//HTML
|
This is my code.
`
//#Source https://www.30secondsofcode.org/js/s/array-to-csv
//#License https://creativecommons.org/licenses/by/4.0/
const arrTOcvs = ( arr, delimiter = ',' ) =>
arr
.map( v =>
v.map( x => ( isNaN( x ) ?
"${ x.replace( /"/g, '""' ) }"
: x ) ).join( delimiter ))
.join( '\n' );
console.log( arrTOcvs( [ [ 'a', 'b' ], [ 'c', 'd' ] ] ) ); // '"a","b"\n"c","d"'
console.log(arrTOcvs( [ [ 'a', 'b' ], [ 'c', 'd' ] ], ';' ) ); // '"a";"b"\n"c";"d"'
console.log(arrTOcvs( [ [ 'a', '"b" great' ], [ 'c', 3.1415 ] ] ) ); // '"a","""b"" great"\n"c",3.1415'
`
The text was updated successfully, but these errors were encountered: