Wakley: Trucchi: function { return “newp”; }
Keane: Django_: simplest way would be splitting and filtering.
Trucchi: Var table = { false: function { return ‘newp’; }, true: function { return ‘yep’; } }; table!’somethingtruthy’
Wakley: Trucchi: function { return “yep”; }
Horgan: But I get an error that it is not defined
Bighorse: And getting the the size of array
Draper: Talk about readability, Trucchi, hehe.
Mccarthy: Django_ refer to stack overflow answers http://stackoverflow.com/a/881111/4445768
Goffinet: Replace the space inside paranthesis with a dash
Trucchi: Tejasmanohar: yeah it’s a terrible idea but it entertains me
Wakley: Nasalroad: string ‘A title XrTlO-yxROn’
Trucchi: Detommaso: it’s because you don’t have a return on line 3, I think
Trucchi: Silverstick: anyway, better to do this.beforeSave.thenthis.send.bindthis.thenthis.success.bindthis – you don’t need the nesting there if send doesn’t care what arguments go into it or if it does, you can pre-bind those args
Randa: Trucchi: the non nested version is the one I tried first
Gleiss: But it seems to call the success before the send finishes
Trucchi: That should be impossible unless send doesn’t return a promise
Trucchi: If send doesn’t return anything, then you’d end up with a promise that immediately resolves to undefined at the end of the chain
Trucchi: Or if send returns any other non-promise
Fellinger: This works I guess ?=.*.*
Stoke: Trucchi: thanks for your help. Here is a little more insight into the functions I am calling.
Meline: Https://gist.github.com/mergeweb/e20dd4133740025781fa
Antignani: Trucchi: it seems that success gets called before the request promise is finished
Stoudenmire: Trucchi: start with line 10 of somefile.js
Bolinsky: Trucchi: do es6 strings support multi-line values? i.e. if i do https://gist.github.com/tejasmanohar/0989be0b3d6d2fa5440d does that create a string that has n’s in it automatically or just 1 string on 1 line but allows me to put the definition of the value across multiple lines
Roscup: Because i don’t like really long long lines for defining strings / phrases
Trucchi: Tejasmanohar: template strings do
Bompiani: But it doesn’t actually add a n right? jaawerth
Linsenmayer: Just lets me mask definition across multiple lines?
Defibaugh: God sublime es6 is terrible O.o
Trucchi: Tejasmanohar: it does, I believe, include the n
Caterina: Do you know how i can do something like this https://gist.github.com/tejasmanohar/d038c5ca56cae8430fb4
Lugo: I just want to spread the definition across multiple lines because i dont like 1 huuuuge line
Garth: Or with huge strings in general
Cooksey: You can declare array like this: var x = ;
Nasalroad: And object like that: var o = {};
Trucchi: Silverstick: well, one thing I just noticed that you might want to address though unrelated is line 18 – it looks like you’re overwriting data with this.form.serialize unless you want that to happen, in which case I wonder why it’s there as a function arg
Trucchi: Tejasmanohar: I don’t think you can. I mean, you can remove the ‘n’ after the fact, but that’s a bad thing to do just so it looks tidier in an editor
Wakley: Dekok: Continuation-P***ing style is the formal term for the “callback-based” approach to programming. CPS is a heavily used idiom in JavaScript to deal with asynchronous programming. See http://matt.might.net/articles/by-example-continuation-p***ing-style/
Bertke: Trucchi: good catch, I just forgot to remove the p***ed var
Coughenour: I got it working with “foo bar”
Vardeman: Http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript
Pandolfo: I don’t think that’s a good approach for browser btu works in node