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

backbone-mongo

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-mongo - npm Package Compare versions

Comparing version 0.0.0 to 0.5.0

.travis.yml

40

package.json
{
"name": "backbone-mongo",
"version": "0.0.0",
"license" : "MIT",
"version": "0.5.0",
"description": "MongoDB storage for BackboneORM",
"main": "./lib/index.js",
"license": "MIT",
"author": "Kevin Malakoff (https://github.com/kmalakoff)",
"contributors": ["Gwilym Humphreys (https://github.com/gwilymhumphreys)"],
"repository" : { "type" : "git", "url" : "https://github.com/vidigami/backbone-mongo"},
"repository": {"type": "git", "url": "https://bitbucket.org/vidigami/backbone-mongo.git"},
"keywords": ["backbone", "orm", "backbone-orm", "mongo", "mongodb"],
"engines": {"node": "*"},
"scripts": {
"test": "npm run build; NODE_ENV=test mocha test/suite.coffee --compilers coffee:coffee-script --reporter spec --timeout 10000",
"build": "coffee -o lib -c src",
"watch": "coffee -o lib -w src",
"clean": "rm -rf lib/*",
"prepublish": "npm run build",
"build_dep": "npm run-script backbone-orm build; npm run-script backbone-rest build",
"watch_dep": "npm run-script backbone-orm watch; npm run-script backbone-rest watch"
},
"devDependencies": {
"coffee-script": "*",
"codo": "1.7.x",
"mocha": "*",
"powerset": "0.0.x",
"backbone-rest": "0.5.x",
"supertest": "0.7.x",
"express": "3.2.x"
},
"dependencies": {
"underscore": "*",
"backbone": "*",
"backbone-orm": "*"
"underscore": "1.5.x",
"backbone": "1.1.x",
"backbone-orm": "0.5.x",
"moment": "2.0.x",
"inflection": "1.2.x",
"mongodb": "1.2.x"
}
}
}

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

backbone-mongo
==============
![logo](https://github.com/vidigami/backbone-mongo/raw/master/media/logo.png)
BackboneMongo provides MongoDB storage for BackboneORM.
Because BackboneORM's query language is based on MongoDB's query language, many queries just work! With a twist...Backbone.ORM provides cross-collection relationships and embedded data for MongoDB.
In addition, BackboneMongo using CouchDB-style '_rev' versioning to ensure coherency of data.
#### Examples (CoffeeScript)
```
class Change extends Backbone.Model
model_name: 'Change'
sync: require('backbone-orm').sync(Change)
class Task extends Backbone.Model
urlRoot: 'mongodb://localhost:27017/tasks'
schema:
project: -> ['belongsTo', Project]
changes: -> ['hasMany', Change, embed: true]
sync: require('backbone-mongo').sync(Task)
class Project extends Backbone.Model
urlRoot: 'mongodb://localhost:27017/projects'
schema:
tasks: -> ['hasMany', Task]
changes: -> ['hasMany', Change, embed: true]
sync: require('backbone-mongo').sync(Project)
```
#### Examples (JavaScript)
```
var Change = Backbone.Model.extend({
model_name: 'Change',
});
Task.prototype.sync = require('backbone-orm').sync(Change);
var Task = Backbone.Model.extend({
urlRoot: 'mongodb://localhost:27017/tasks',
schema: {
project: function() { return ['belongsTo', Project]; }
changes: function() { return ['hasMany', Change, {embed: true}]; }
}
});
Task.prototype.sync = require('backbone-mongo').sync(Task);
var Project = Backbone.Model.extend({
urlRoot: 'mongodb://localhost:27017/projects',
schema: {
tasks: function() { return ['hasMany', Task]; }
changes: function() { return ['hasMany', Change, {embed: true}]; }
}
});
Project.prototype.sync = require('backbone-mongo').sync(Project);
```
Please [checkout the website](http://vidigami.github.io/backbone-orm/backbone-mongo.html) for installation instructions, examples, documentation, and community!
### For Contributors
To build the library for Node.js:
$ npm run build
Please run tests before submitting a pull request.
$ npm test

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