
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
snapdragon-is-inside
Advanced tools
Snapdragon plugin that adds an `isInside` method to the compiler instance for checking if a node is currently inside a given node type.
Snapdragon plugin that adds an
isInsidemethod to the compiler instance for checking if a node is currently inside a given node type.
Install with npm:
$ npm install --save snapdragon-is-inside
The main export if a function that should be passed to snapdragon.use() to register the plugin.
Example
var Snapdragon = require('snapdragon');
var isInside = require('snapdragon-is-inside');
// register the plugin
var snapdragon = new Snapdragon();
snapdragon.use(isInside());
// or register directly on the compiler instance
var compiler = new Snapdragon.Compiler();
compiler.use(isInside());
Returns true if node is currently inside the given node type(s).
Params
node {Object}types {String|Array|Regex}: Pass one or more types to check for, or a regex to use for matching types.returns {Boolean}: Returns true if the pluginExample
snapdragon.use(isInside());
snapdragon.compiler
.set('foo', function(node) {
if (this.isInside(node, 'some-other-node-type')) {
// do stuff
}
});
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 21, 2017.
FAQs
Snapdragon plugin that adds an `isInside` method to the compiler instance for checking if a node is currently inside a given node type.
We found that snapdragon-is-inside 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
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.