Permalink
Browse files

Try to augment Object.keys without regard to the check for Date.proto…

…type.toISOString.
  • Loading branch information...
1 parent a5943e5 commit 1192221d7acaef985e30400dadb842d3c3e1c4ce Bram Stein committed with isaacs Jul 11, 2011
Showing with 20 additions and 16 deletions.
  1. +20 −16 registry/app.js
View
@@ -71,12 +71,13 @@ ddoc.shows.requirey = function () {
return d.getTime()
return [d.getTime(), d.toUTCString(), ds, ts, tz]
}
- Object.keys = Object.keys
- || function (o) { var a = []
- for (var i in o) a.push(i)
- return a }
}
+ Object.keys = Object.keys
+ || function (o) { var a = []
+ for (var i in o) a.push(i)
+ return a }
+
return { code : 200
, body : toJSON([require("semver").expression.toString(), typeof ("asdf".match),
require("semver").clean("0.2.4-1"),
@@ -835,12 +836,13 @@ ddoc.shows.package = function (doc, req) {
return d.getTime()
return [d.getTime(), d.toUTCString(), ds, ts, tz]
}
- Object.keys = Object.keys
- || function (o) { var a = []
- for (var i in o) a.push(i)
- return a }
}
+ Object.keys = Object.keys
+ || function (o) { var a = []
+ for (var i in o) a.push(i)
+ return a }
+
var semver = require("semver")
, code = 200
, headers = {"Content-Type":"application/json"}
@@ -976,12 +978,13 @@ ddoc.updates.package = function (doc, req) {
return d.getTime()
return [d.getTime(), d.toUTCString(), ds, ts, tz]
}
- Object.keys = Object.keys
- || function (o) { var a = []
- for (var i in o) a.push(i)
- return a }
}
+ Object.keys = Object.keys
+ || function (o) { var a = []
+ for (var i in o) a.push(i)
+ return a }
+
var semver = require("semver")
var valid = require("valid")
function error (reason) {
@@ -1137,12 +1140,13 @@ ddoc.validate_doc_update = function (newDoc, oldDoc, user) {
return d.getTime()
return [d.getTime(), d.toUTCString(), ds, ts, tz]
}
- Object.keys = Object.keys
- || function (o) { var a = []
- for (var i in o) a.push(i)
- return a }
}
+ Object.keys = Object.keys
+ || function (o) { var a = []
+ for (var i in o) a.push(i)
+ return a }
+
Array.isArray = Array.isArray
|| function (a) { return a instanceof Array
|| (typeof a === "object" && typeof a.length === "number") }

0 comments on commit 1192221

Please sign in to comment.