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 2.5.1 to 2.5.2

2

generate-docs.js
const docket = require('docket-parser');
docket.title(`EZ Objects v2.5.1`);
docket.title(`EZ Objects v2.5.2`);
docket.linkClass('text-success');
docket.parseFiles(['index.js', 'mysql-connection.js']);
docket.generateDocs('docs');
{
"name": "ezobjects",
"version": "2.5.1",
"version": "2.5.2",
"description": "Easy dynamic object generation with optional MySQL table linking",

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

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

# EZ Objects v2.5.1
# EZ Objects v2.5.2

@@ -237,11 +237,11 @@ EZ Objects is a Node.js module (that can also be usefully browserify'd) that aims to save you lots of time

### new MyObject([data])
* **Parameters:** data PlainObject (optional)
* **Parameters:** data - `PlainObject` - (optional)
* **Description:** Create a new MyObject object and initialize it using either defaults or any provided key/value pairs in the plain object `data`. Keys can either be equal to the name of a property, or they can be have an underscore before the name of a property, as would be the case if you were to JSON.stringify() and then JSON.parse() an EZ Object. This allows for easy transferability in cases where JSON is used as the transfer medium.
### new MyObject([data])
* **Parameters:** data string (optional)
* **Parameters:** data - `string` - (optional)
* **Description:** Create a new MyObject object and initialize it using either defaults or any provided key/value pairs in the JSON encoded string `data`. Keys can either be equal to the name of a property, or they can be have an underscore before the name of a property, as would be the case if you were to JSON.stringify() an EZ Object. This allows for easy transferability in cases where JSON is used as the transfer medium.
### MyObject.init([data])
* **Parameters:** data PlainObject
* **Parameters:** data - `PlainObject`
* **Description:** Initialize this object using either defaults or any provided key/value pairs in the plain object `data`. This is also the method used by the constructor.

@@ -253,10 +253,10 @@

### MyObject.myProperty()
* **Returns:** mixed
* **Returns:** `mixed`
* **Description:** Get the value of the property.
### MyObject.myProperty(value)
* **Parameters:** value mixed
* **Throws:** TypeError if `value` is not of the correct javascript data type for myProperty
* **Parameters:** value - `mixed`
* **Throws:** `TypeError` if `value` is not of the correct javascript data type for myProperty
* **Returns:** this
* **Description:** Set the value of the property, throwing an error if the javascript data type does not match the configuration, this is howthe strict typing is implemented. This signature returns `this` to allow for set call chaining.
* **Description:** Set the value of the property, throwing an error if the javascript data type does not match the configuration, this is how the strict typing is implemented. This signature returns `this` to allow for set call chaining.

@@ -269,11 +269,11 @@ ## MySQL EZ Object Method Signatures

### MyObject.delete(db)
* **Parameters:** db MySQLConnection
* **Parameters:** db - `MySQLConnection`
* **Description:** Delete the record in database `db`, table `tableName`, that has its `id` field equal to the `id` property of this object.
### MyObject.insert(db)
* **Parameters:** db MySQLConnection
* **Parameters:** db - `MySQLConnection`
* **Description:** Insert this object's property values into the database `db`, table `tableName`, and store the resulting insertId in the `id` property of this object.
### MyObject.load(db, id)
* **Parameters:** db MySQLConnection
* **Parameters:** db - `MySQLConnection`
* **Parameters:** id number The value of the `id` property of the record you wish to load

@@ -283,8 +283,8 @@ * **Description:** Load the record in database `db`, table `tableName`, that has its `id` field equal to provided `id` parameter.

### MyObject.load(db, fieldValue)
* **Parameters:** db MySQLConnection
* **Parameters:** fieldValue mixed The value of the `stringSearchField` property of the record you wish to load
* **Description:** Load the record in database `db`, table `tableName`, that has its `stringSearchField` field equal to provided `id` parameter. Here, the actual field name of `stringSearchField` is provided in the object configuration, see the more detailed specifications below.
* **Parameters:** db - `MySQLConnection`
* **Parameters:** fieldValue - `mixed` - The value of the `stringSearchField` property of the record you wish to load
* **Description:** Load the record in database `db`, table `tableName`, that has its `stringSearchField` field equal to provided `fieldValue` parameter. Here, the actual field name of `stringSearchField` is provided in the object configuration, see the configuration section below.
### MyObject.load(url)
* **Parameters:** url The URL of a back-end that provides JSON data compatible with this object's initializer
* **Parameters:** url - `string` - The URL of a back-end that provides JSON data compatible with this object's initializer
* **Description:** Load the JSON-encoded data obtained from `url` using this object's initializer.

@@ -294,3 +294,3 @@ * **Note:** This signature is useful only when your classes are standalone browserify'd and requires you to implement a backend at `url` that will output the JSON. This signature also requires you have jQuery loaded prior to use.

### MyObject.update(db)
* **Parameters:** db MySQLConnection
* **Parameters:** db - `MySQLConnection`
* **Description:** Update the record in database `db`, table `tableName`, with its `id` field equal to the `id` property of this object, using this object's property values.

@@ -297,0 +297,0 @@

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