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

ezobjects

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezobjects - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

8

index.js

@@ -49,5 +49,3 @@ /**

parent[table.className] = class {
/**
* Constructor for new object.
*/
/** Constructor for new object. */
constructor(data = {}) {

@@ -182,7 +180,9 @@ /** Loop through each field in the table */

*/
Object.defineProperty(parent[table.className], 'name', {value: table.name});
Object.defineProperty(parent[table.className], 'name', { value: table.name });
}
/** Create our table model! */
createObject(table);
/** Example uses of resulting class on global scope */
const a = new Person();

@@ -189,0 +189,0 @@

{
"name": "ezobjects",
"version": "0.1.5",
"version": "0.1.6",
"description": "Easy dynamic object generation with strict typing and set chaining",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -45,2 +45,3 @@ # EZ Objects

/** Create a class on the global scope using the configuration provided in `table` */
function createObject(table) {

@@ -57,5 +58,3 @@ let parent;

parent[table.className] = class {
/**
* Constructor for new object.
*/
/** Constructor for new object. */
constructor(data = {}) {

@@ -193,4 +192,6 @@ /** Loop through each field in the table */

/** Create our table model! */
createObject(table);
/** Example newly initialized object using defaults */
const a = new Person();

@@ -200,2 +201,3 @@

/** Example newly initialized object using data object as parameter to constructor */
const b = new Person({

@@ -212,2 +214,3 @@ id: 1,

/** Example newly initialized object using defaults, then assigning properties using setter methods */
const c = new Person();

@@ -214,0 +217,0 @@

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