Fix node.js old example in readme

This commit is contained in:
Faisal Salman
2012-09-15 01:47:04 +07:00
parent 65703e7c1a
commit ec40433c5c
2 changed files with 9 additions and 12 deletions

View File

@@ -19,7 +19,7 @@
// build object barebones
for (k = 0; k < props.length; k++) {
if (typeof props[k] == 'object') {
if (typeof props[k] === 'object') {
result[props[k][0]] = undefined;
} else {
result[props[k]] = undefined;
@@ -51,8 +51,8 @@
var maps = {
check : function(str, map){
for (var i in map){
check : function (str, map) {
for (var i in map) {
if (map.hasOwnProperty(i)) {
if (typeof map[i] === 'object' && map[i].length > 0) {
for (var j = 0; j < map[i].length; j++) {