Gathering detailed insights and metrics for snapdragon-visit
Gathering detailed insights and metrics for snapdragon-visit
Gathering detailed insights and metrics for snapdragon-visit
Gathering detailed insights and metrics for snapdragon-visit
npm install snapdragon-visit
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
1 Commits
2 Watchers
1 Branches
3 Contributors
Updated on Nov 30, 2017
Latest Version
1.0.0
Package Id
snapdragon-visit@1.0.0
Size
3.19 kB
NPM Version
5.5.1
Node Version
9.1.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
3
visit and mapVisit methods for snapdragon nodes.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
1$ npm install --save snapdragon-visit
Use snapdragon-visit
in your node.js library with the following line of code:
1const visit = require('snapdragon-visit');
Visit the given node
with the specified function, the calls mapVisit if node.nodes
exists.
Params
node
{Object}: (required) Instance of snapdragon-node, or if a plain object is passed it will be converted to an instance of snapdragon-node.fn
{Function}: (required)parent
{Object}: (optional) Instance of snapdragon-node to use as the node.parent
returns
{Object}: Returns the given node.Example
1const ast = new Node({type: 'root'}); 2visit(ast, function(node) { 3 node.val = '*'; 4}); 5console.log(ast.val); 6//=> '*'
Calls visit on each node in node.nodes
.
Params
node
{Object}fn
{Function}returns
{Object}: Returns the given node.Example
1var node = new Node({type: 'star', val: ''}); 2var ast = new Node({type: 'root', nodes: []}); 3ast.push(node); 4 5visit.map(ast, function(node) { 6 if (node.type === 'star') { 7 node.val = '*'; 8 } 9}); 10 11console.log(node.val); 12//=> '*'
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on November 21, 2017.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More