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

orgast-util-visit-ids

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orgast-util-visit-ids - npm Package Compare versions

Comparing version 0.4.5 to 0.5.0

16

lib/index.js

@@ -1,10 +0,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.visitIds = void 0;
const unist_util_visit_parents_1 = __importDefault(require("unist-util-visit-parents"));
function visitIds(tree, f) {
unist_util_visit_parents_1.default(tree, { type: 'node-property', key: 'ID' }, (property, ancestors) => {
import { visitParents } from 'unist-util-visit-parents';
export function visitIds(tree, f) {
// This issue does not seem fixed
// 👀https://github.com/syntax-tree/unist-util-visit/issues/33
// @ts-ignore Incessantly deep type instantiation
visitParents(tree, { type: 'node-property', key: 'ID' }, (property, ancestors) => {
const id = property.value;

@@ -22,3 +19,2 @@ let parent = ancestors.pop();

}
exports.visitIds = visitIds;
//# sourceMappingURL=index.js.map
{
"name": "orgast-util-visit-ids",
"version": "0.4.5",
"version": "0.5.0",
"type": "module",
"description": "orgast (uniorg) utility to visit all nodes with ids",

@@ -40,13 +41,13 @@ "keywords": [

"devDependencies": {
"@types/jest": "^26.0.23",
"@types/unist": "^2.0.3",
"jest": "^26.6.3",
"typescript": "^4.3.2",
"uniorg": "^0.4.0",
"uniorg-parse": "^0.4.5"
"@types/jest": "27.4.1",
"@types/unist": "2.0.6",
"jest": "27.5.1",
"typescript": "4.6.3",
"uniorg": "^0.5.0",
"uniorg-parse": "^0.5.0"
},
"dependencies": {
"unist-util-visit-parents": "^3.1.1"
"unist-util-visit-parents": "5.1.0"
},
"gitHead": "3d6bc077f2ee16eebf35d57e6b93d98022e0b65d"
"gitHead": "e77afd8255895985eaa8b0cf15de8edab81a89b6"
}

@@ -11,13 +11,10 @@ # `orgast-util-visit-ids`

## Use
```js
import unified from 'unified';
import { unified } from 'unified';
import uniorgParse from 'uniorg-parse';
import { visitIds } from 'orgast-util-visit-ids';
const tree = unified()
.use(uniorgParse)
.parse(`
const tree = unified().use(uniorgParse).parse(`
:PROPERTIES:

@@ -45,6 +42,4 @@ :ID: id-org-data

## API
### `visitIds(node: OrgData, callback: (id: string, node: OrgData | Headline) => void)`

@@ -51,0 +46,0 @@

Sorry, the diff of this file is not supported yet

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