Skip to content

Commit

Permalink
✨ Feat: Provide a custom parsing function for the lib
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 committed Jan 28, 2018
1 parent ba2da45 commit 352cc87
Show file tree
Hide file tree
Showing 38 changed files with 23,149 additions and 21,828 deletions.
43,698 changes: 22,125 additions & 21,573 deletions docs/ast/source/TorrentLibrary.js.json

Large diffs are not rendered by default.

64 changes: 56 additions & 8 deletions docs/ast/source/docs/types/types.js.json
@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
"end": 5672,
"end": 6389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 151,
"line": 168,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 5672,
"end": 6389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 151,
"line": 168,
"column": 0
}
},
Expand Down Expand Up @@ -174,6 +174,22 @@
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * A parsing function to be used with this lib\r\n * @typedef {Function} customParsingFunction\r\n * @param {string} title - The file name\r\n * @return {TPN} the result\r\n * @example\r\n * // default parser used in this lib\r\n * const parser = require(\"parse-torrent-title\").parser;\r\n * @example\r\n * // extended default parser as explained here : https://github.com/clement-escolano/parse-torrent-title#advanced-usage\r\n * const ptt = require(\"parse-torrent-title\");\r\n * ptt.addHandler(\"part\", /Part[. ]([0-9])/i, { type: \"integer\" });\r\n * const parser = ptt.parse;\r\n * @example\r\n * // original parser used in this lib : https://github.com/jy95/torrent-name-parser\r\n * const parser = require('torrent-name-parser');\r\n ",
"start": 5672,
"end": 6387,
"loc": {
"start": {
"line": 151,
"column": 0
},
"end": {
"line": 167,
"column": 3
}
}
}
]
},
Expand Down Expand Up @@ -321,6 +337,22 @@
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * A parsing function to be used with this lib\r\n * @typedef {Function} customParsingFunction\r\n * @param {string} title - The file name\r\n * @return {TPN} the result\r\n * @example\r\n * // default parser used in this lib\r\n * const parser = require(\"parse-torrent-title\").parser;\r\n * @example\r\n * // extended default parser as explained here : https://github.com/clement-escolano/parse-torrent-title#advanced-usage\r\n * const ptt = require(\"parse-torrent-title\");\r\n * ptt.addHandler(\"part\", /Part[. ]([0-9])/i, { type: \"integer\" });\r\n * const parser = ptt.parse;\r\n * @example\r\n * // original parser used in this lib : https://github.com/jy95/torrent-name-parser\r\n * const parser = require('torrent-name-parser');\r\n ",
"start": 5672,
"end": 6387,
"loc": {
"start": {
"line": 151,
"column": 0
},
"end": {
"line": 167,
"column": 3
}
}
}
],
"tokens": [
Expand Down Expand Up @@ -468,6 +500,22 @@
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * A parsing function to be used with this lib\r\n * @typedef {Function} customParsingFunction\r\n * @param {string} title - The file name\r\n * @return {TPN} the result\r\n * @example\r\n * // default parser used in this lib\r\n * const parser = require(\"parse-torrent-title\").parser;\r\n * @example\r\n * // extended default parser as explained here : https://github.com/clement-escolano/parse-torrent-title#advanced-usage\r\n * const ptt = require(\"parse-torrent-title\");\r\n * ptt.addHandler(\"part\", /Part[. ]([0-9])/i, { type: \"integer\" });\r\n * const parser = ptt.parse;\r\n * @example\r\n * // original parser used in this lib : https://github.com/jy95/torrent-name-parser\r\n * const parser = require('torrent-name-parser');\r\n ",
"start": 5672,
"end": 6387,
"loc": {
"start": {
"line": 151,
"column": 0
},
"end": {
"line": 167,
"column": 3
}
}
},
{
"type": {
"label": "eof",
Expand All @@ -481,15 +529,15 @@
"binop": null,
"updateContext": null
},
"start": 5672,
"end": 5672,
"start": 6389,
"end": 6389,
"loc": {
"start": {
"line": 151,
"line": 168,
"column": 0
},
"end": {
"line": 151,
"line": 168,
"column": 0
}
}
Expand Down

0 comments on commit 352cc87

Please sign in to comment.