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

class-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-wrapper - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

doc/class-wrapper/2.1.1/Class.js.html

5

dest/class-wrapper.amd.js
/**
* class-wrapper v2.1.0
* class-wrapper v2.1.1
* Copyright (c) 2016-2019 Valerii Zinchenko

@@ -117,3 +117,3 @@ * License: MIT http://valerii-zinchenko.gitlab.io/observer/blob/master/LICENSE.txt

* - Define the classes/functions/objects that are going to be encapsulated into the resulting class. The last encapsulated object will have a precedence over the previous, even the parent properties. Only the new used-defined properties for the new class will have the highest precedence. This gives the possibility to add other methods and properties into the class without touching the inheritance chain.
* - Provide the interface(s) that the class should implement. Interface can be any object with or without the implementation of the methods. It will be used just to get the method name and check if that method is implemented. If it is not, then the default method will be added to the class and it could be treated as an abstract metod. By calling this abstract method it will throw an exception with the message, that this method is abstract.
* - Provide the interface(s) that the class should implement. Interface can be any object with or without the implementation of the methods. It will be used just to get the method name and check if that method is implemented. If it is not, then the default method will be added to the class and it could be treated as an abstract method. By calling this abstract method it will throw an exception with the message, that this method is abstract.
*

@@ -302,2 +302,3 @@ * @see {@link Class}

// Storage of base parent classes. It is used to identify the root parent class when the constructor should have to copy default properties into `this`

@@ -304,0 +305,0 @@ const baseClasses = [];

2

dest/class-wrapper.amd.min.js
/**
* class-wrapper v2.1.0
* class-wrapper v2.1.1
* Copyright (c) 2016-2019 Valerii Zinchenko

@@ -4,0 +4,0 @@ * License: MIT http://valerii-zinchenko.gitlab.io/observer/blob/master/LICENSE.txt

@@ -20,2 +20,3 @@ /*

// Storage of base parent classes. It is used to identify the root parent class when the constructor should have to copy default properties into `this`

@@ -22,0 +23,0 @@ const baseClasses = [];

@@ -31,3 +31,3 @@ /*

* - Define the classes/functions/objects that are going to be encapsulated into the resulting class. The last encapsulated object will have a precedence over the previous, even the parent properties. Only the new used-defined properties for the new class will have the highest precedence. This gives the possibility to add other methods and properties into the class without touching the inheritance chain.
* - Provide the interface(s) that the class should implement. Interface can be any object with or without the implementation of the methods. It will be used just to get the method name and check if that method is implemented. If it is not, then the default method will be added to the class and it could be treated as an abstract metod. By calling this abstract method it will throw an exception with the message, that this method is abstract.
* - Provide the interface(s) that the class should implement. Interface can be any object with or without the implementation of the methods. It will be used just to get the method name and check if that method is implemented. If it is not, then the default method will be added to the class and it could be treated as an abstract method. By calling this abstract method it will throw an exception with the message, that this method is abstract.
*

@@ -34,0 +34,0 @@ * @see {@link Class}

{
"name": "class-wrapper",
"version": "2.1.0",
"description": "Set of wrappers to create classes with construction behaviour like in C++",
"version": "2.1.1",
"description": "Set of wrappers to create classes like in C++ and other components",
"main": "main.js",

@@ -17,6 +17,7 @@ "author": "Valerii Zinchenko",

"posttest": "nyc report --reporter=text --reporter=html",
"clean": "rm -rf dest doc coverage .nyc_output",
"doc": "grunt jsdoc:nightly",
"doc-versioned": "grunt jsdoc:version",
"preversion": "npm test",
"postversion": "grunt jsdoc:version",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run clean && npm run build && npm run doc-versioned"
},

@@ -29,3 +30,3 @@ "directories": {

"grunt": "1.x",
"grunt-cli": "1.x",
"grunt-cli": "^1.3.2",
"grunt-contrib-copy": "1.x",

@@ -36,9 +37,9 @@ "grunt-jsdoc": "^2.1.0",

"mocha": "^5.1.0",
"nyc": "^13.0.0",
"nyc": "^13.2.0",
"portfinder": "^1.0.20",
"puppeteer": "^1.11.0",
"puppeteer": "^1.12.1",
"puppeteer-to-istanbul": "^1.2.2",
"rollup": "^1.1.2",
"rollup-plugin-banner": "^0.2.0",
"rollup-plugin-terser": "^4.0.3",
"rollup-plugin-terser": "^4.0.4",
"sinon": "^4.5.0"

@@ -45,0 +46,0 @@ },

@@ -6,7 +6,8 @@ # {class}

The main goal of this library is to automate some construction routines, that a developer is usually writing by himself, and to provide more flexibility to create new classes.
This library suppies:
This library supplies:
* `ClassBuilder` - is the main wrapper that realizes the inheritance, data encapsulation, stores the default values and in result it returns a class. This builder is useful to define custom pre-construction routines by setting the class constructor template.
* `Class` - is a `ClassBuilder` with already predefined construction routines. The resulting behavior of how the objects are constructing is similar to the behaviour in C++ - all parent constructors are executing first, starting from the root parent constructor, only then the constructor of the class will be executed. With this there is no need to always explicitly call the parent constructor in each constructor function and pass there all the arguments. The constructor function can contain only the effective code that is needed for a new class.
* `Interface` - is a simple builder of interfaces, that will be passed into Class under property `Implements`. It allows to extend some parent interface.
Defined class properties are treated as default values for a new instance and they are isolated between instances. For example if some class has a simple object in properties (Object, or Array), then each instance will have its own copy of that object.
Defined class properties are treated as default values for a new instance and they are isolated between instances. For example, if some class has a simple object in properties (Object or Array), then each instance will have its own copy of that object.

@@ -27,3 +28,2 @@

Via [NPM](https://www.npmjs.com/)
```

@@ -30,0 +30,0 @@ $ npm install class-wrapper --save

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