Category Archives: JavaScript

JavaScript destructuring with rename not logical?

To destructure a member variable from an object and rename it at the same time, the code looks like: const { property: myprop } = { property: ‘hello’ } Now that to me is back to front.  I would think … Continue reading

Posted in JavaScript, Uncategorized | Tagged | Leave a comment

Chrome: How to step into code not available in debugger?

It’s been a while, but I am back! Came across a situation today where I wanted to step through some javascript code that had been installed by a third party (in this case, a puppeteer script) so there was no … Continue reading

Posted in Chrome, debugging, JavaScript, Uncategorized | Leave a comment

Don’t like npm!!

Every time I have to use npm I find myself hating it.  I hate the general direction software development seems to be headed, with loads and loads of bloat. An example of this taken to an extreme is the new … Continue reading

Posted in Cordova, JavaScript, windows, Windows 10 | Leave a comment

A basic requirejs for WScript

So I like the module pattern when programming javascript.  So when I came to writing a script to process some inbound emails in an MSSQL database, I had already chosen JavaScript as my language of choice, and wanted to use the … Continue reading

Posted in JavaScript, module pattern, require, WScript | Tagged , , , | Leave a comment

How to convert SQL Blob to Text in JavaScript

The problem I was facing was that I had some text in a database stored in an image field (blob data), and I wanted to get at that text in javascript.  After a lot of searching and some experimentation, I … Continue reading

Posted in JavaScript, WScript | Tagged , , , , | Leave a comment

Uploading images using XHR2, Cordova and Android ICS

I ran into a problem recently in an App I was writing for both desktop and mobile use.  The image capture and more specifically the upload component which worked fine on desktop was not working on android. There were several … Continue reading

Posted in Android, Cordova, html5, JavaScript, upload | Leave a comment

<<0 faster than ~~ at least in chrome 10.0.648.15 (parseInt alternatives)

Was reading about use of ~~ in javascript and saw the comment from Lea about using <<0 to achieve the same, so I thought it would be interesting to compare the performance of both. In my tests which tested … Continue reading

Posted in JavaScript | Tagged | Leave a comment

xhr-pt.js – Flexible XHR timeouts This is a javascript AMD module that provides a modern XHR implementation, with additional support for flexible progressive timeouts.  It makes XHR simple.

Posted in API, JavaScript | Tagged , | Leave a comment

JavaScript how to append one array to another

The javascript Array function concat() joins two arrays and returns the new array, so you end up with 3 arrays, the original, the one being appended, and the concatenated array. This code below extends the array object by adding an … Continue reading

Posted in JavaScript | Leave a comment

Debug syntax error in ajax loaded module

Ok so your using a modern app framework in javascript that loads javascript using ajax and executes it using eval. One issue that can arrise is when you have a syntax error in the javascript, all you get is an … Continue reading

Posted in debugging, JavaScript | Leave a comment