Browse files

restored

  • Loading branch information...
1 parent 9f4f374 commit f93ca2cfa1bec58497815bbc6ed7c3a8cbdbc661 @donpark committed Aug 27, 2012
Showing with 6 additions and 8 deletions.
  1. +1 −1 index.coffee
  2. +4 −6 index.js
  3. +1 −1 package.json
View
2 index.coffee
@@ -2,5 +2,5 @@ mongoose = require('mongoose')
exports.create = ->
mongeese = new mongoose.Mongoose()
- mongeese[key] = value for own key, value of Mongoose when typeof mongoose[key] is 'undefined'
+ mongeese[key] = value for key, value of mongoose when not mongeese[key]? and mongoose.hasOwnProperty(key)
mongeese
View
10 index.js
@@ -1,17 +1,15 @@
// Generated by CoffeeScript 1.3.3
(function() {
- var mongoose,
- __hasProp = {}.hasOwnProperty;
+ var mongoose;
mongoose = require('mongoose');
exports.create = function() {
var key, mongeese, value;
mongeese = new mongoose.Mongoose();
- for (key in Mongoose) {
- if (!__hasProp.call(Mongoose, key)) continue;
- value = Mongoose[key];
- if (typeof mongoose[key] === 'undefined') {
+ for (key in mongoose) {
+ value = mongoose[key];
+ if (!(mongeese[key] != null) && mongoose.hasOwnProperty(key)) {
mongeese[key] = value;
}
}
View
2 package.json
@@ -2,7 +2,7 @@
"author": "Don Park <donpark@docuverse.com> (http://blog.docuverse.com)",
"name": "mongeese",
"description": "Mongoose multi-database helper",
- "version": "0.0.4",
+ "version": "0.0.5",
"main": "./index.js",
"repository": {
"type": "git",

0 comments on commit f93ca2c

Please sign in to comment.