Tag Archives: javascript
Regular Expression for Removing HTML Tags
Here is a regex (regular expression) solution to remove HTML tags from content that doesn’t effect the content in javaScript or anything else for that matter… “/(<([^>]+)>)/ig” Continue reading
NodeJS, ExpressJS and MustacheJS Template Engine
Here is a very scaled back way of using NodeJS, ExpressJS and Mustache JS to render full blown web pages using HTML templates. I seem to think this is a much easier solution than what I’ve seen so far on the web. Continue reading
Listen for Folder or File Changes Using “Node.js”
Here is a quick tutorial on using fs.watchFile and fs.readFile in node.js. This will listen or “watch” for file changes on the server and then spit the contents of the file out to the console. However once you get a handle to the data you can do something more useful with it. Let’s check it out.
Get Length of JavaScript Object Array
Unlike javaScript arrays, the “.length” property doesn’t exist in objects. Why? because it’s an object of data. Just a place to store stuff. So here’s a small and simple script you can run to return the length of an object so you can sift through it. Continue reading
Ordinal numbers in javaScript
I came across a need to display numbers with “ordinals” (1st, 2nd, 3rd, 4th, etc.) in one of our pages at Foxsports.com.
I didn’t see any scripts out there that did the mathematics for this properly, so I created one that works pretty well. Check it out! Continue reading