New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-core-data

Package Overview
Dependencies
Maintainers
1
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-core-data - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

test/schemes/car-model-custom-classes-invalid.yaml

15

lib/Descriptors/EntityDescription.js

@@ -53,3 +53,7 @@ // Generated by CoffeeScript 1.6.3

EntityDescription.prototype.objectClass = function() {
var e, _m;
var cls, e, _m;
if (this._objectClass) {
return this._objectClass;
}
cls = null;
if (this.objectClassName) {

@@ -59,3 +63,3 @@ _m = module.parent;

try {
return require(path.dirname(_m.filename) + this.objectClassName);
cls = require(path.dirname(_m.filename) + this.objectClassName);
} catch (_error) {

@@ -70,4 +74,9 @@ e = _error;

} else {
return ManagedObject;
cls = ManagedObject;
}
if (!cls) {
throw new Error('module for class ' + this.name + ' not found');
}
this._objectClass = cls;
return cls;
};

@@ -74,0 +83,0 @@

1

lib/Parsers/ModelYamlParser.js

@@ -55,2 +55,3 @@ // Generated by CoffeeScript 1.6.3

entity.objectClassName = info["class"];
entity.objectClass();
}

@@ -57,0 +58,0 @@ entities[entityName] = entity;

{
"name": "js-core-data",
"description": "ORM inspired by Apple's Objective-C CoreData",
"version": "0.0.15",
"version": "0.0.16",
"dependencies":{

@@ -6,0 +6,0 @@ "moment":"x",

@@ -27,2 +27,7 @@ var assert = require("assert"),

})
it('should throw error if no custom file module found',function(){
assert.throws(function(){
var model = new ManagedObjectModel(__dirname + '/schemes/car-model-custom-classes-invalid.yaml');
})
})
it('should create object with valid class',function(){

@@ -29,0 +34,0 @@ assert.ok(car instanceof Car)

Sorry, the diff of this file is not supported yet

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