Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/write array command #83

Open
wants to merge 3 commits into
base: release
Choose a base branch
from

Conversation

matthewquinn
Copy link

Fixed handling of first parameter being a type of array of strings in channel.write.
Added allowance for forward slashes in field values grep.

@XtoZee
Copy link

XtoZee commented Dec 13, 2018

Array parameter in 'write' method surely needs to be fixed! Not possible to run queries in requests

@@ -55,5 +55,9 @@
"main": "dist/mikronode.js",
"engines": {
"node": ">= 6"
},
"dependencies": {
"pegjs": "^0.10.0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pegjs should be devDependencies
Promise is not required since it is available natively in NodeJs

@@ -359,7 +359,7 @@ export default class Channel extends events.EventEmitter {
} else return o;
},{})

const isListen=command.split('/').indexOf('listen')>0;
const isListen= typeof command === 'object' ? command.indexOf('listen')>0 : command.split('/').indexOf('listen')>0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Array.isArray(command)?command:command.split('/')).indexOf('listend')>0

@@ -17,7 +17,7 @@ data
= id:identifier value:value s { return {field:id, value:value}}

identifier
= "=" id:[\.a-zA-Z\-0-9]+ "=" {return id.join('')}
= "=" id:[\.a-zA-Z\-0-9\/]+ "=" {return id.join('')}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should '/' be allowed as part of an ID? Could :, |, ;, _, or - be used just as effectively? Didn't want to cause issues when doing splits and regular expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants