Socket
Socket
Sign inDemoInstall

@membrane/membrane-sdk-js

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@membrane/membrane-sdk-js - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

6

lib/ref.js

@@ -27,6 +27,6 @@ "use strict";

}
return "[".concat(value, "]");
return "(".concat(value, ")");
}
else if (typeof value === "string") {
return "\"".concat(value, "\"");
else if (typeof value === "string" || typeof value === "object") {
return JSON.stringify(value);
}

@@ -33,0 +33,0 @@ return "".concat(value);

@@ -84,9 +84,9 @@ "use strict";

RefParser.prototype.parseInnerRef = function () {
if (this.char !== "[") {
throw this.syntaxError("Expected '['");
if (this.char !== "(") {
throw this.syntaxError("Expected '('");
}
this.advance(1);
var result = this.parseRef();
if (this.char !== "]") {
throw this.syntaxError("Expected ']'");
if (this.char !== ")") {
throw this.syntaxError("Expected ')'");
}

@@ -117,3 +117,6 @@ this.advance(1);

var name;
if (isLowerCase(this.code) || isDigit(this.code) || this.code === _POUND || this.code === _AT) {
if (isLowerCase(this.code) ||
isDigit(this.code) ||
this.code === _POUND ||
this.code === _AT) {
name = this.parseProgramIdentifier();

@@ -149,4 +152,3 @@ }

!isDigit(this.code) &&
!this.code === _POUND &&
!this.code === _AT) {
this.code !== _POUND) {
throw this.syntaxError("Expected program identifier");

@@ -163,3 +165,7 @@ }

var minus = false;
while (isIdentifierChar(this.code) || this.code === _MINUS) {
var at = false;
while (isIdentifierChar(this.code) ||
this.code === _MINUS ||
this.code === _AT) {
// Only one dash in a row
if (this.code === _MINUS && minus) {

@@ -169,2 +175,9 @@ throw this.syntaxError("Root names cannot have two \"-\" in sequence");

minus = this.code === _MINUS;
// Only one @ in the program identifier
if (this.code === _AT) {
if (at) {
throw this.syntaxError("Ref root cannot have more than one \"@\"");
}
at = true;
}
this.advance(1);

@@ -181,3 +194,3 @@ }

RefParser.prototype.isEndOfRef = function () {
return this.position >= this.str.length || this.code === _BRACKETCLOSE;
return this.position >= this.str.length || this.code === _PARENCLOSE;
};

@@ -246,3 +259,3 @@ RefParser.prototype.parsePath = function () {

var type;
if (this.code === _BRACKETOPEN) {
if (this.code === _PARENOPEN) {
type = "ref";

@@ -408,4 +421,4 @@ value = this.parseInnerRef();

var _AT = "@".charCodeAt(0);
var _BRACKETOPEN = "[".charCodeAt(0);
var _BRACKETCLOSE = "]".charCodeAt(0);
var _PARENOPEN = "(".charCodeAt(0);
var _PARENCLOSE = ")".charCodeAt(0);
var _E = "E".charCodeAt(0);

@@ -412,0 +425,0 @@ var _e = "e".charCodeAt(0);

{
"name": "@membrane/membrane-sdk-js",
"version": "0.2.5",
"version": "0.2.6",
"description": "Helpers for working with Membrane",

@@ -17,6 +17,8 @@ "license": "MIT",

"dependencies": {
"assert": "^2.1.0",
"deep-equal": "^1.0.1",
"immutable": "^4.3.0",
"lodash.debounce": "^4.0.8",
"promise-timeout": "1.1.1"
"promise-timeout": "1.1.1",
"util": "^0.12.5"
},

@@ -23,0 +25,0 @@ "devDependencies": {

@@ -1,14 +0,3 @@

# Goals
- Shared between client and server (and thus not in avya-common)
- Write a fully immutable version of Ref (should I use immutable.js?)
- Write a consistent version of SchemaTraversal. And RefTraversal?
- Use flow on all files. Export types
- Test as much as possible so that I can work on a solid foundation
Membrane gref parser and schema utils using immutable.js
# Modules
- Ref. Use Immutable.js so that we don't need a RefBuilder
- SchemaTraversal. Same as old one but with a consistent interface
- RefTraversal. Traverses a ref through a schema.
- Ref normalization/denormalization? Possibly
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