Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textlint-rule-helper

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-rule-helper - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

CHANGELOG.md

@@ -6,4 +6,4 @@ ## 1.1.0 (2015-01-08)

* **helper:** implement `#getParents` and `isChildNode` ([44db06f6](https://github.com/azu/textlint-rule-helper/commit/44db06f683ac9b735272e5c5e4c5b18ba2abfda3))
* **helper:** implement `#getParents` and `isChildNode` ([44db06f6](https://github.com/textlint/textlint-rule-helper/commit/44db06f683ac9b735272e5c5e4c5b18ba2abfda3))

@@ -0,3 +1,7 @@

// LICENSE : MIT
"use strict";
/**
* RuleHelper is helper class for textlint.
* @class RuleHelper
*/
Object.defineProperty(exports, "__esModule", {

@@ -11,9 +15,2 @@ value: true

// LICENSE : MIT
"use strict";
/**
* RuleHelper is helper class for textlint.
* @class RuleHelper
*/
var RuleHelper = (function () {

@@ -31,12 +28,12 @@ /**

/**
* Get parents of node.
* The parent nodes are returned in order from the closest parent to the outer ones.
* {@link node} is not contained in the results.
* @param {TxtNode} node the node is start point.
* @returns {TxtNode[]}
*/
_createClass(RuleHelper, [{
key: "getParents",
/**
* Get parents of node.
* The parent nodes are returned in order from the closest parent to the outer ones.
* {@link node} is not contained in the results.
* @param {TxtNode} node the node is start point.
* @returns {TxtNode[]}
*/
value: function getParents(node) {

@@ -51,4 +48,2 @@ var result = [];

}
}, {
key: "isChildNode",

@@ -61,2 +56,4 @@ /**

*/
}, {
key: "isChildNode",
value: function isChildNode(node, types) {

@@ -79,2 +76,2 @@ var parents = this.getParents(node);

exports.RuleHelper = RuleHelper;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy90ZXh0bGludC1ydWxlLWhlbHBlci5qcyJdLCJuYW1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cbiAgICAgICAgd2hpbGUgKHBhcmVudCAhPSBudWxsKSB7XG4gICAgICAgICAgICByZXN1bHQucHVzaChwYXJlbnQpO1xuICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybiB0cnVlIGlmIGBub2RlYCBpcyB3cmFwcGVkIGFueSBvbmUgb2Ygbm9kZSB7QGxpbmsgdHlwZXN9LlxuICAgICAqIEBwYXJhbSB7VHh0Tm9kZX0gbm9kZSBpcyB0YXJnZXQgbm9kZVxuICAgICAqIEBwYXJhbSB7c3RyaW5nW119IHR5cGVzIGFyZSB3cmFwcGVkIHRhcmdldCBub2RlXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59XG4gICAgICovXG4gICAgaXNDaGlsZE5vZGUobm9kZSwgdHlwZXMpIHtcbiAgICAgICAgdmFyIHBhcmVudHMgPSB0aGlzLmdldFBhcmVudHMobm9kZSk7XG4gICAgICAgIHZhciBwYXJlbnRzVHlwZXMgPSBwYXJlbnRzLm1hcChmdW5jdGlvbiAocGFyZW50KSB7XG4gICAgICAgICAgICByZXR1cm4gcGFyZW50LnR5cGU7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdHlwZXMuc29tZShmdW5jdGlvbiAodHlwZSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcmVudHNUeXBlcy5zb21lKGZ1bmN0aW9uIChwYXJlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcmVudFR5cGUgPT09IHR5cGU7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxufSJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy90ZXh0bGludC1ydWxlLWhlbHBlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoi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ICAgICAgICAgcmVzdWx0LnB1c2gocGFyZW50KTtcbiAgICAgICAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnQ7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXR1cm4gdHJ1ZSBpZiBgbm9kZWAgaXMgd3JhcHBlZCBhbnkgb25lIG9mIG5vZGUge0BsaW5rIHR5cGVzfS5cbiAgICAgKiBAcGFyYW0ge1R4dE5vZGV9IG5vZGUgaXMgdGFyZ2V0IG5vZGVcbiAgICAgKiBAcGFyYW0ge3N0cmluZ1tdfSB0eXBlcyBhcmUgd3JhcHBlZCB0YXJnZXQgbm9kZVxuICAgICAqIEByZXR1cm5zIHtib29sZWFufVxuICAgICAqL1xuICAgIGlzQ2hpbGROb2RlKG5vZGUsIHR5cGVzKSB7XG4gICAgICAgIHZhciBwYXJlbnRzID0gdGhpcy5nZXRQYXJlbnRzKG5vZGUpO1xuICAgICAgICB2YXIgcGFyZW50c1R5cGVzID0gcGFyZW50cy5tYXAoZnVuY3Rpb24gKHBhcmVudCkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcmVudC50eXBlO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHR5cGVzLnNvbWUoZnVuY3Rpb24gKHR5cGUpIHtcbiAgICAgICAgICAgIHJldHVybiBwYXJlbnRzVHlwZXMuc29tZShmdW5jdGlvbiAocGFyZW50VHlwZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnRUeXBlID09PSB0eXBlO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cbn0iXX0=
{
"name": "textlint-rule-helper",
"description": "Helper for textlint rule.",
"version": "1.1.3",
"homepage": "https://github.com/azu/textlint-rule-helper/",
"version": "1.1.4",
"homepage": "https://github.com/textlint/textlint-rule-helper/",
"repository": {
"type": "git",
"url": "https://github.com/azu/textlint-rule-helper.git"
"url": "https://github.com/textlint/textlint-rule-helper.git"
},

@@ -26,3 +26,3 @@ "main": "lib/textlint-rule-helper.js",

"bugs": {
"url": "https://github.com/azu/textlint-rule-helper/issues"
"url": "https://github.com/textlint/textlint-rule-helper/issues"
},

@@ -29,0 +29,0 @@ "devDependencies": {

# textlint-rule-helper
This is helper library for creating [textlint](https://github.com/azu/textlint "textlint") rule.
This is helper library for creating [textlint](https://github.com/textlint/textlint "textlint") rule.

@@ -76,3 +76,3 @@ ## Installation

A rule for [textlint](https://github.com/azu/textlint "textlint").
A rule for [textlint](https://github.com/textlint/textlint "textlint").

@@ -79,0 +79,0 @@ ```js

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc