snapdragon-util
Advanced tools
Comparing version 2.1.0 to 2.1.1
'use strict'; | ||
var define = require('define-property'); | ||
var typeOf = require('kind-of'); | ||
@@ -151,5 +150,3 @@ | ||
for (var i = 0; i < node.nodes.length; i++) { | ||
var childNode = node.nodes[i]; | ||
define(childNode, 'parent', node); | ||
exports.visit(childNode, options, fn) || childNode; | ||
exports.visit(node.nodes[i], options, fn); | ||
} | ||
@@ -156,0 +153,0 @@ return node; |
{ | ||
"name": "snapdragon-util", | ||
"description": "Utilities for the snapdragon parser/compiler.", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"homepage": "https://github.com/jonschlinkert/snapdragon-util", | ||
@@ -23,3 +23,2 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"define-property": "^0.2.5", | ||
"kind-of": "^3.1.0" | ||
@@ -26,0 +25,0 @@ }, |
@@ -29,3 +29,3 @@ # snapdragon-util [![NPM version](https://img.shields.io/npm/v/snapdragon-util.svg?style=flat)](https://www.npmjs.com/package/snapdragon-util) [![NPM monthly downloads](https://img.shields.io/npm/dm/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![NPM total downloads](https://img.shields.io/npm/dt/snapdragon-util.svg?style=flat)](https://npmjs.org/package/snapdragon-util) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/snapdragon-util.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/snapdragon-util) | ||
### [.isNode](index.js#L18) | ||
### [.isNode](index.js#L17) | ||
@@ -46,3 +46,3 @@ Returns true if the given value is a node. | ||
### [.noop](index.js#L33) | ||
### [.noop](index.js#L32) | ||
@@ -62,3 +62,3 @@ Emit an empty string for the given `node`. | ||
### [.emit](index.js#L53) | ||
### [.emit](index.js#L52) | ||
@@ -82,3 +82,3 @@ Emit `val` for the given node. Useful when you know what needs to be emitted in advance and you don't need to access the actual node. | ||
### [.toNoop](index.js#L71) | ||
### [.toNoop](index.js#L70) | ||
@@ -99,3 +99,3 @@ Converts an AST node into an empty `text` node and deletes `node.nodes`. | ||
### [.visit](index.js#L101) | ||
### [.visit](index.js#L100) | ||
@@ -122,3 +122,3 @@ Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon automatically calls registered compilers, this allows you to pass a visitor function. | ||
### [.mapVisit](index.js#L140) | ||
### [.mapVisit](index.js#L139) | ||
@@ -145,3 +145,3 @@ Map [visit](#visit) with the given `fn` over an array of AST `nodes`. | ||
### [.wrapNodes](index.js#L168) | ||
### [.wrapNodes](index.js#L165) | ||
@@ -157,3 +157,3 @@ Wraps the given `node` with `*.open` and `*.close` nodes. | ||
### [.addOpen](index.js#L183) | ||
### [.addOpen](index.js#L180) | ||
@@ -169,3 +169,3 @@ Unshift an `*.open` node onto `node.nodes`. | ||
### [.addClose](index.js#L203) | ||
### [.addClose](index.js#L200) | ||
@@ -181,3 +181,3 @@ Push a `*.close` node onto `node.nodes`. | ||
### [.pushNode](index.js#L229) | ||
### [.pushNode](index.js#L226) | ||
@@ -202,3 +202,3 @@ Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent. | ||
### [.unshiftNode](index.js#L251) | ||
### [.unshiftNode](index.js#L248) | ||
@@ -223,3 +223,3 @@ Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent. | ||
### [.isType](index.js#L273) | ||
### [.isType](index.js#L270) | ||
@@ -243,3 +243,3 @@ Returns true if `node` is a valid [Node](https://github.com/jonschlinkert/snapdragon-node) and `node.type` matches the given `type`. | ||
### [.hasType](index.js#L317) | ||
### [.hasType](index.js#L314) | ||
@@ -269,3 +269,3 @@ Returns true if the given `node` has the given `type` in `node.nodes`. | ||
### [.firstOfType](index.js#L349) | ||
### [.firstOfType](index.js#L346) | ||
@@ -296,3 +296,3 @@ Returns the first node from `node.nodes` of the given `type` | ||
### [.getNode](index.js#L390) | ||
### [.getNode](index.js#L387) | ||
@@ -327,3 +327,3 @@ Returns the node at the specified index, or the first node of the given `type` from `node.nodes`. | ||
### [.isOpen](index.js#L416) | ||
### [.isOpen](index.js#L413) | ||
@@ -350,3 +350,3 @@ Returns true if the given node is an "*.open" node. | ||
### [.isClose](index.js#L441) | ||
### [.isClose](index.js#L438) | ||
@@ -373,3 +373,3 @@ Returns true if the given node is a "*.close" node. | ||
### [.hasOpen](index.js#L469) | ||
### [.hasOpen](index.js#L466) | ||
@@ -399,3 +399,3 @@ Returns true if `node.nodes` **has** an `.open` node | ||
### [.hasClose](index.js#L497) | ||
### [.hasClose](index.js#L494) | ||
@@ -425,3 +425,3 @@ Returns true if `node.nodes` **has** a `.close` node | ||
### [.hasOpenAndClose](index.js#L529) | ||
### [.hasOpenAndClose](index.js#L526) | ||
@@ -455,3 +455,3 @@ Returns true if `node.nodes` has both `.open` and `.close` nodes | ||
### [.addType](index.js#L543) | ||
### [.addType](index.js#L540) | ||
@@ -467,3 +467,3 @@ Push the given `node` onto the `state.inside` array for the | ||
### [.last](index.js#L667) | ||
### [.last](index.js#L664) | ||
@@ -479,3 +479,3 @@ Get the last `n` element from the given `array`. Used for getting | ||
### [.arrayify](index.js#L687) | ||
### [.arrayify](index.js#L684) | ||
@@ -500,3 +500,3 @@ Cast the given `val` to an array. | ||
### [.stringify](index.js#L700) | ||
### [.stringify](index.js#L697) | ||
@@ -551,2 +551,2 @@ Convert the given `val` to a string by joining with `,`. Useful | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 04, 2017._ |
1
30845
629
- Removeddefine-property@^0.2.5
- Removeddefine-property@0.2.5(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.7(transitive)