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

metaschema

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metaschema - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

20

lib/decorators.js

@@ -12,4 +12,14 @@ 'use strict';

class Enum extends ValuesDecorator {}
class Bitmask extends ValuesDecorator {}
const createEnum = (...values) => new Enum(values);
class Flags extends ValuesDecorator {
constructor(values, enumDomain) {
super(values);
this.enum = enumDomain;
}
}
const createFlags = (...values) => new Flags(values);
createFlags.of = enumDomain => new Flags(null, enumDomain);
class Decorator {

@@ -64,2 +74,3 @@ constructor(def) {

class View extends Decorator {}
class Memory extends Decorator {}

@@ -75,3 +86,4 @@ module.exports = {

History: def => new History(def),
View: def => new View(def)
View: def => new View(def),
Memory: def => new Memory(def)
},

@@ -81,4 +93,4 @@ attribute: {

// Data types
Enum: (...values) => new Enum(values),
Bitmask: (...values) => new Bitmask(values),
Enum: createEnum,
Flags: createFlags,
// Relations

@@ -85,0 +97,0 @@ Many: def => new Many(def),

@@ -73,2 +73,7 @@ 'use strict';

const domain = schema[name];
const decorator = domain.constructor.name;
if (decorator === 'Flags' && domain.enum) {
const enumDomain = schema[domain.enum];
domain.values = enumDomain.values;
}
domains.set(name, domain);

@@ -75,0 +80,0 @@ }

2

package.json
{
"name": "metaschema",
"version": "0.0.17",
"version": "0.0.18",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Metadata Schema and Interface Definition Language (IDL)",

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