Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongo-go

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-go - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/Class/Logger.d.ts

23

dist/Class/MongoGo.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MongoGo = void 0;
const mongoose_1 = __importStar(require("mongoose"));
const mongoose_1 = require("mongoose");
const Collection_1 = require("../Utility/Collection");

@@ -39,3 +20,3 @@ const mix = mongoose_1.SchemaTypes.Mixed;

}
mongoose_1.default.connect(MongoURI);
(0, mongoose_1.connect)(MongoURI);
this.ready();

@@ -42,0 +23,0 @@ }

export * from "./Class/MongoGo";
export * from "./Class/Logger";
export * from "./Utility/Collection";

@@ -14,2 +14,3 @@ "use strict";

__exportStar(require("./Class/MongoGo"), exports);
__exportStar(require("./Class/Logger"), exports);
__exportStar(require("./Utility/Collection"), exports);

@@ -319,1 +319,2 @@ export interface CollectionConstructor {

export { Collection };
export default Collection;

@@ -14,3 +14,3 @@ "use strict";

static default = Collection;
['constructor'];
['constructor'] = Collection;
constructor(entries) {

@@ -32,2 +32,7 @@ super(entries);

Object.defineProperty(this, '_keyArray', { value: null, writable: true, configurable: true });
if (entries?.[Symbol.iterator]) {
for (const [key, value] of entries) {
this.set(key, value);
}
}
}

@@ -397,1 +402,2 @@ /**

exports.Collection = Collection;
exports.default = Collection;
{
"name": "mongo-go",
"version": "1.0.0",
"version": "1.1.0",
"description": "An easy to use database handler for MongoDB, inspired by quick.db!",

@@ -22,8 +22,11 @@ "main": "dist/index.js",

"dependencies": {
"@types/ms": "^0.7.34",
"chalk": "^4.1.2",
"mongoose": "^6.0.2",
"ms": "^2.1.3",
"typescript": "^4.4.2"
},
"devDependencies": {
"@types/node": "^16.7.6",
"typedoc": "^0.21.9"
"@types/node": "^16.18.73",
"typedoc": "^0.21.10"
},

@@ -30,0 +33,0 @@ "homepage": "owenpotent.github.io/mongo-go/",

@@ -88,2 +88,15 @@ ## MongoGo

**Important!**
Keep it mind that `<MongoGo>` is just an example instance, you may rename it to your own likings.
Keep it mind that `<MongoGo>` is just an example instance, you may rename it to your own likings.
## License
MongoGo is licensed under the MIT license. See [LICENSE](https://github.com/git/git-scm.com) for more information.
## Updates
- **1.0.0**
- Initial release
- **1.1.0**
- Added `push` method
- Added `collection` getter
- Added `logger` class

@@ -1,2 +0,2 @@

import mongoose, { connection, model, Schema, SchemaTypes } from "mongoose";
import { connection, model, Schema, SchemaTypes, connect } from "mongoose";
import { MongoGoSchema } from "../Interfaces/MongoGoSchema";

@@ -23,3 +23,3 @@ import { Collection } from "../Utility/Collection";

mongoose.connect(MongoURI)
connect(MongoURI)

@@ -26,0 +26,0 @@ this.ready()

export * from "./Class/MongoGo";
export * from "./Class/Logger";
export * from "./Utility/Collection";

@@ -19,3 +19,3 @@ export interface CollectionConstructor {

public static readonly default: typeof Collection = Collection;
public ['constructor']: typeof Collection;
public ['constructor']: typeof Collection = Collection;

@@ -40,2 +40,8 @@ public constructor(entries?: ReadonlyArray<readonly [K, V]> | null) {

Object.defineProperty(this, '_keyArray', { value: null, writable: true, configurable: true });
if (entries?.[Symbol.iterator]) {
for (const [key, value] of entries) {
this.set(key, value);
}
}
}

@@ -605,2 +611,3 @@

export { Collection };
export { Collection };
export default Collection;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc