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

Enhance if-feature to comply with YANG1.1, additional npm package:voll #53

Closed
wants to merge 1 commit into from

Conversation

vcshox
Copy link
Contributor

@vcshox vcshox commented Jan 16, 2017

I use voll package to handle the logic expression of the if-feature arguments.

After extracting all the mentioned features, I reuse the origin code to build my logic control string:

feature = @lookup 'feature', feature_name
control_string += (feature_name + " ") if feature?.binding?

Any feature name appears in the control_string stands for true otherwise false

I am not sure if you accept other npm packages as dependencies.

Hope this help.

@sekur
Copy link
Collaborator

sekur commented Jan 17, 2017

Thanks, let me analyze the voll package dependency and see if it's a lightweight dependency for this function.

@sekur
Copy link
Collaborator

sekur commented Jan 18, 2017

@vcshox - I quickly ran browserify on the voll dependency and it would add about 17KB to the overall yang-js build. I think it's a bit overkill for this simple parsing case. I'll add an implementation for this using comparse which is the underlying parser that implements the yang-parser module since that parsing library is already included as part of yang-js build.

@vcshox
Copy link
Contributor Author

vcshox commented Jan 19, 2017

@saintkepha
Thank you!

@vcshox vcshox closed this Jan 19, 2017
@vcshox vcshox deleted the if-feature1.1 branch January 20, 2017 15:11
sekur added a commit that referenced this pull request Jan 24, 2017
…ER with new xparse library (see #49, #53). also change default behavior of property binding to handle return value as the node content (see #26)
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.

None yet

2 participants