
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
snapdragon-position
Advanced tools
Snapdragon util and plugin for patching the position on an AST node.
Install with npm:
$ npm install --save snapdragon-position
Position is not always needed when parsing, and when converting an existing AST to a snapdragon AST the existing position information can be converted too.
This plugin adds a .position() method to the parser instance for cases when you do need position information on your AST nodes.
The main export if a function that is passed to snapdragon.use().
Example
var Snapdragon = require('snapdragon');
var position = require('snapdragon-position');
var parser = new Snapdragon.Parser();
parser.use(position());
Mark position and patch node.position with start and end line and column.
returns {Function}: Returns a function that takes node and is called before returning the node in a parser visitor function.Example
parser.set('foo', function(node) {
var pos = this.position();
var match = this.match(/foo/);
if (match) {
// pass `pos` to `this.node` to patch position
return pos(this.node(match[0]));
}
});
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.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.4.1, on January 20, 2017.
FAQs
Snapdragon util and plugin for patching the position on an AST node.
The npm package snapdragon-position receives a total of 3 weekly downloads. As such, snapdragon-position popularity was classified as not popular.
We found that snapdragon-position demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.