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

@haventech/supertype

Package Overview
Dependencies
Maintainers
5
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haventech/supertype - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2-beta.0

6

dist/serializer.js

@@ -84,2 +84,6 @@ "use strict";

}
//Object id should be set by persistor at save.
if (obj && obj._id) {
obj._id = null;
}
idMap[getId(pojo.__id__.toString())] = obj;

@@ -170,2 +174,2 @@ // Go through all the properties and transfer them to newly created object

;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJpYWxpemVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOztHQUVHO0FBQ0g7Ozs7Ozs7O0dBUUc7QUFDSCxTQUFnQixZQUFZLENBQUMsR0FBRyxFQUFFLEVBQUc7SUFDakMsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDO0lBRWYsSUFBSTtRQUNBLE9BQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLEVBQUUsU0FBUyxDQUFDLENBQUMsR0FBRyxFQUFFLEtBQUs7WUFDNUMsSUFBSSxHQUFHLEtBQUssb0JBQW9CLElBQUksR0FBRyxLQUFLLFVBQVUsRUFBRTtnQkFDcEQsT0FBTyxJQUFJLENBQUM7YUFDZjtZQUNELElBQUksS0FBSyxJQUFJLEtBQUssQ0FBQyxZQUFZLElBQUksS0FBSyxDQUFDLE1BQU0sRUFBRTtnQkFDN0MsSUFBSSxLQUFLLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFFO29CQUNyQixLQUFLLEdBQUcsRUFBRSxNQUFNLEVBQUUsS0FBSyxDQUFDLE1BQU0sQ0FBQyxRQUF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2YWx1ZS5fX2lkX19dKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0geyBfX2lkX186IHZhbHVlLl9faWRfXy50b1N0cmluZygpIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZE1hcFt2YWx1ZS5fX2lkX18udG9TdHJpbmcoKV0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgIHJldHVybiBjYihrZXksIHZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgdGhyb3cgZTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIHByb3BYZmVyKHByb3AsIHBvam8sIG9iaikge1xuICAgIGlmIChwb2pvW3Byb3BdKSB7XG4gICAgICAgIG9ialtwcm9wXSA9IHBvam9bcHJvcF07XG4gICAgfVxufVxuXG4vKipcbiAqIE9iamVjdFRlbXBsYXRlLmZyb21QT0pPXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBmcm9tUE9KTyhwb2pvLCB0ZW1wbGF0ZSwgZGVmaW5lUHJvcGVydHk/LCBpZE1hcD8sIGlkUXVhbGlmaWVyPywgcGFyZW50PywgcHJvcD8sIGNyZWF0b3I/KSB7XG4gICAgZnVuY3Rpb24gZ2V0SWQoaWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiAoaWRRdWFsaWZpZXIpICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgcmV0dXJuIGlkICsgJy0nICsgaWRRdWFsaWZpZXI7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWQ7XG4gICAgfVxuXG4gICAgLy8gRm9yIHJlY29yZGluZyBiYWNrIHJlZnNcbiAgICBpZiAoIWlkTWFwKSB7XG4gICAgICAgIGlkTWFwID0ge307XG4gICAgfVxuXG4gICAgaWYgKCFwb2pvLl9faWRfXykge1xuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgdmFyIG9iajtcblxuICAgIGlmIChjcmVhdG9yKSB7XG4gICAgICAgIG9iaiA9IGNyZWF0b3IocGFyZW50LCBwcm9wLCB0ZW1wbGF0ZSwgaWRNYXBbcG9qby5fX2lkX18udG9TdHJpbmcoKV0sIHBvam8uX190cmFuc2llbnRfXyk7XG5cbiAgICAgICAgaWYgKG9iaiBpbnN0YW5jZW9mIEFycmF5KSB7XG4gICAgICAgICAgICBvYmogPSBvYmpbMF07XG4gICAgICAgICAgICBpZE1hcFtvYmouX19pZF9fLnRvU3RyaW5nKCldID0gb2JqO1xuICAgICAgICAgICAgcmV0dXJuIG9iajtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgKG9iaikgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghb2JqKSB7XG4gICAgICAgICAgICB0aGlzLm5vSW5pdCA9IHRydWU7XG4gICAgICAgICAgICBvYmogPSBuZXcgdGVtcGxhdGUoKTtcbiAgICAgICAgICAgIHRoaXMubm9Jbml0ID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIG9iaiA9IHRoaXMuX2NyZWF0ZUVtcHR5T2JqZWN0KHRlbXBsYXRlLCBnZXRJZChwb2pvLl9faWRfXy50b1N0cmluZygpKSwgZGVmaW5lUHJvcGVydHksIHBvam8uX190cmFuc2llbnRfXyk7XG4gICAgfVxuXG4gICAgaWRNYXBbZ2V0SWQocG9qby5fX2lkX18udG9TdHJpbmcoKSldID0gb2JqO1xuXG4gICAgLy8gR28gdGhyb3VnaCBhbGwgdGhlIHByb3BlcnRpZXMgYW5kIHRyYW5zZmVyIHRoZW0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gICAgICAgICAgICBhcnJheURpcmVjdGlvbnMgPSBjcmVhdG9yKG9iaiwgcHJvcGIsIGRlZmluZVByb3Aub2YsIGlkTWFwW3Bvam8uX19pZF9fLnRvU3RyaW5nKCldLCBwb2pvLl9fdHJhbnNpZW50X18pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKGFycmF5RGlyZWN0aW9ucykgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpeCA9IDA7IGl4IDwgcG9qb1twb2pvUHJvcF0ubGVuZ3RoOyArK2l4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXR5cGUgPSBwb2pvW3Bvam9Qcm9wXVtpeF0uX190ZW1wbGF0ZV9fIHx8IGRlZmluZVByb3Aub2Y7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocG9qb1twb2pvUHJvcF1baXhdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBvam9bcG9qb1Byb3BdW2l4XS5fX2lkX18gJiYgaWRNYXBbZ2V0SWQocG9qb1twb2pvUHJvcF1baXhdLl9faWRfXy50b1N0cmluZygpKV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXVtpeF0gPSBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXVtpeF0uX19pZF9fLnRvU3RyaW5nKCkpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl1baXhdID0gdGhpcy5mcm9tUE9KTyhwb2pvW3Bvam9Qcm9wXVtpeF0sIGF0eXBlLCBkZWZpbmVQcm9wLCBpZE1hcCwgaWRRdWFsaWZpZXIsIG9iaiwgcHJvcGIsIGNyZWF0b3IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl1baXhdID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IFtdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUuaXNPYmplY3RUZW1wbGF0ZSkgeyAvLyBUZW1wbGF0ZWQgb2JqZWN0c1xuICAgICAgICAgICAgICAgIHZhciBvdHlwZSA9IHBvam9bcG9qb1Byb3BdLl9fdGVtcGxhdGVfXyB8fCB0eXBlO1xuICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXS5fX2lkX18gJiYgaWRNYXBbZ2V0SWQocG9qb1twb2pvUHJvcF0uX19pZF9fLnRvU3RyaW5nKCkpXSkge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gaWRNYXBbZ2V0SWQocG9qb1twb2pvUHJvcF0uX19pZF9fLnRvU3RyaW5nKCkpXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSB0aGlzLmZyb21QT0pPKHBvam9bcG9qb1Byb3BdLCBvdHlwZSwgZGVmaW5lUHJvcCwgaWRNYXAsIGlkUXVhbGlmaWVyLCBvYmosIHByb3BiLCBjcmVhdG9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlID09IERhdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAocG9qb1twb2pvUHJvcF0pIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IG5ldyBEYXRlKHBvam9bcG9qb1Byb3BdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBwb2pvW3Bvam9Qcm9wXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIEZvciB0aGUgYmVuZWZpdCBvZiBwZXJzaXN0T2JqZWN0VGVtcGxhdGVcbiAgICBpZiAoIWNyZWF0b3IgJiYgcG9qby5faWQpIHtcbiAgICAgICAgb2JqLl9pZCA9IGdldElkKHBvam8uX2lkKTtcbiAgICB9XG5cbiAgICBpZiAoIWNyZWF0b3IpIHtcbiAgICAgICAgcHJvcFhmZXIoJ19fY2hhbmdlZF9fJywgcG9qbywgb2JqKTtcbiAgICAgICAgcHJvcFhmZXIoJ19fdmVyc2lvbl9fJywgcG9qbywgb2JqKTtcbiAgICB9XG5cbiAgICBwcm9wWGZlcignX190b1NlcnZlcl9fJywgcG9qbywgb2JqKTtcbiAgICBwcm9wWGZlcignX190b0NsaWVudF9fJywgcG9qbywgb2JqKTtcblxuICAgIHJldHVybiBvYmo7XG59O1xuXG5cbi8qKlxuICogT2JqZWN0VGVtcGxhdGUuZnJvbUpTT05cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZyb21KU09OKHN0ciwgdGVtcGxhdGUsIGlkUXVhbGlmaWVyKSB7XG4gICAgcmV0dXJuIHRoaXMuZnJvbVBPSk8oSlNPTi5wYXJzZShzdHIpLCB0ZW1wbGF0ZSwgbnVsbCwgbnV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ycmF5RGlyZWN0aW9ucyA9IGNyZWF0b3Iob2JqLCBwcm9wYiwgZGVmaW5lUHJvcC5vZiwgaWRNYXBbcG9qby5fX2lkX18udG9TdHJpbmcoKV0sIHBvam8uX190cmFuc2llbnRfXyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYXJyYXlEaXJlY3Rpb25zKSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGl4ID0gMDsgaXggPCBwb2pvW3Bvam9Qcm9wXS5sZW5ndGg7ICsraXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHlwZSA9IHBvam9bcG9qb1Byb3BdW2l4XS5fX3RlbXBsYXRlX18gfHwgZGVmaW5lUHJvcC5vZjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXVtpeF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocG9qb1twb2pvUHJvcF1baXhdLl9faWRfXyAmJiBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXVtpeF0uX19pZF9fLnRvU3RyaW5nKCkpXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdW2l4XSA9IGlkTWFwW2dldElkKHBvam9bcG9qb1Byb3BdW2l4XS5fX2lkX18udG9TdHJpbmcoKSldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXVtpeF0gPSB0aGlzLmZyb21QT0pPKHBvam9bcG9qb1Byb3BdW2l4XSwgYXR5cGUsIGRlZmluZVByb3AsIGlkTWFwLCBpZFF1YWxpZmllciwgb2JqLCBwcm9wYiwgY3JlYXRvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXVtpeF0gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodHlwZS5pc09iamVjdFRlbXBsYXRlKSB7IC8vIFRlbXBsYXRlZCBvYmplY3RzXG4gICAgICAgICAgICAgICAgdmFyIG90eXBlID0gcG9qb1twb2pvUHJvcF0uX190ZW1wbGF0ZV9fIHx8IHR5cGU7XG4gICAgICAgICAgICAgICAgaWYgKHBvam9bcG9qb1Byb3BdLl9faWRfXyAmJiBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXS5fX2lkX18udG9TdHJpbmcoKSldKSB7XG4gICAgICAgICAgICAgICAgICAgIG9ialtwcm9wYl0gPSBpZE1hcFtnZXRJZChwb2pvW3Bvam9Qcm9wXS5fX2lkX18udG9TdHJpbmcoKSldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IHRoaXMuZnJvbVBPSk8ocG9qb1twb2pvUHJvcF0sIG90eXBlLCBkZWZpbmVQcm9wLCBpZE1hcCwgaWRRdWFsaWZpZXIsIG9iaiwgcHJvcGIsIGNyZWF0b3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT0gRGF0ZSkge1xuICAgICAgICAgICAgICAgIGlmIChwb2pvW3Bvam9Qcm9wXSkge1xuICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcGJdID0gbmV3IERhdGUocG9qb1twb2pvUHJvcF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgb2JqW3Byb3BiXSA9IHBvam9bcG9qb1Byb3BdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gRm9yIHRoZSBiZW5lZml0IG9mIHBlcnNpc3RPYmplY3RUZW1wbGF0ZVxuICAgIGlmICghY3JlYXRvciAmJiBwb2pvLl9pZCkge1xuICAgICAgICBvYmouX2lkID0gZ2V0SWQocG9qby5faWQpO1xuICAgIH1cblxuICAgIGlmICghY3JlYXRvcikge1xuICAgICAgICBwcm9wWGZlcignX19jaGFuZ2VkX18nLCBwb2pvLCBvYmopO1xuICAgICAgICBwcm9wWGZlcignX192ZXJzaW9uX18nLCBwb2pvLCBvYmopO1xuICAgIH1cblxuICAgIHByb3BYZmVyKCdfX3RvU2VydmVyX18nLCBwb2pvLCBvYmopO1xuICAgIHByb3BYZmVyKCdfX3RvQ2xpZW50X18nLCBwb2pvLCBvYmopO1xuXG4gICAgcmV0dXJuIG9iajtcbn07XG5cblxuLyoqXG4gKiBPYmplY3RUZW1wbGF0ZS5mcm9tSlNPTlxuICovXG5leHBvcnQgZnVuY3Rpb24gZnJvbUpTT04oc3RyLCB0ZW1wbGF0ZSwgaWRRdWFsaWZpZXIpIHtcbiAgICByZXR1cm4gdGhpcy5mcm9tUE9KTyhKU09OLnBhcnNlKHN0ciksIHRlbXBsYXRlLCBudWxsLCBudWxsLCBpZFF1YWxpZmllcik7XG59O1xuIl19

2

package.json
{
"name": "@haventech/supertype",
"description": "A type system for classical inheritence, mix-ins and composition.",
"version": "5.0.1",
"version": "5.0.2-beta.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -94,2 +94,7 @@ /**

//Object id should be set by persistor at save.
if (obj && obj._id) {
obj._id = null;
}
idMap[getId(pojo.__id__.toString())] = obj;

@@ -96,0 +101,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