Node.js mobile detect

Install mobile detect module on your nodejs server (place yourself on the root where your node_modules folder is and type

then on your server node.js code type

https://www.npmjs.com/package/mobile-detect

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Javascript class example

Here is an example on how to use classes and methods in Javascript:

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Javascript Arrays – push and remove items

If you are working with Javascript Array, you would probably benefit from these additional functions handling Array elements. They allow to add and remove items without fetching the whole array.

To push an item to the Array (unique item) we are using the following function:

To remove an item to the Array we can use the following function:

How to use it:

Schermata 2014-03-15 a 19.42.44

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Javascript – is_numeric() PHP like function

Here below a javascript function to recall the PHP isNumeric behaviour:

is_numeric() in Javascript

Facebooktwittergoogle_plusredditpinterestlinkedinmail