@orgajs/reorg-parse 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -0
- package/index.js +26 -1
- package/package.json +7 -6
- package/lib/index.js +0 -26
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @import {Document, ParseOptions} from 'orga'
|
|
3
|
+
* @import {Processor} from 'unified'
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {ParseOptions} Options
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { parse } from 'orga'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Aadd support for parsing from org-mode.
|
|
14
|
+
*
|
|
15
|
+
* @this {Processor<Document>}
|
|
16
|
+
* Processor instance.
|
|
17
|
+
* @param {Partial<ParseOptions> | undefined} [options]
|
|
18
|
+
* Configuration (optional).
|
|
19
|
+
* @returns {undefined}
|
|
20
|
+
* Nothing.
|
|
21
|
+
*/
|
|
22
|
+
export default function reorgParse(options) {
|
|
23
|
+
this.parser = function (document) {
|
|
24
|
+
return parse(document, options)
|
|
25
|
+
}
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orgajs/reorg-parse",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "orga parser for unifiedjs",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"files": [
|
|
6
7
|
"lib/",
|
|
7
|
-
"index.js"
|
|
8
|
+
"index.js",
|
|
9
|
+
"index.d.ts",
|
|
10
|
+
"index.d.ts.map"
|
|
8
11
|
],
|
|
9
|
-
"
|
|
10
|
-
"main": "index.js",
|
|
11
|
-
"types": "index.d.ts",
|
|
12
|
+
"exports": "./index.js",
|
|
12
13
|
"author": "Xiaoxing Hu <hi@xiaoxing.dev>",
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"homepage": "https://github.com/orgapp/orgajs/tree/main/packages/reorg-parse#readme",
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"directory": "packages/reorg-parse"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"orga": "^4.
|
|
22
|
+
"orga": "^4.5.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"typescript": "^5.7.3",
|
package/lib/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @import {Document, ParseOptions} from 'orga'
|
|
3
|
-
* @import {Processor} from 'unified'
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @typedef {ParseOptions} Options
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { parse } from 'orga'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Aadd support for parsing from org-mode.
|
|
14
|
-
*
|
|
15
|
-
* @this {Processor<Document>}
|
|
16
|
-
* Processor instance.
|
|
17
|
-
* @param {Partial<ParseOptions> | undefined} [options]
|
|
18
|
-
* Configuration (optional).
|
|
19
|
-
* @returns {undefined}
|
|
20
|
-
* Nothing.
|
|
21
|
-
*/
|
|
22
|
-
export default function reorgParse(options) {
|
|
23
|
-
this.parser = function (doc) {
|
|
24
|
-
return parse(doc, options)
|
|
25
|
-
}
|
|
26
|
-
}
|