@technote-space/anchor-markdown-header
Advanced tools
+7
-7
@@ -36,3 +36,3 @@ "use strict"; | ||
| const getGithubId = (text, repetition) => { | ||
| text = exports.getBasicGithubId(text); | ||
| text = (0, exports.getBasicGithubId)(text); | ||
| // If no repetition, or if the repetition is 0 then ignore. Otherwise append '-' and the number. | ||
@@ -43,3 +43,3 @@ if (repetition) { | ||
| // Strip emojis | ||
| text = text.replace(emoji_regex_1.default(), ''); | ||
| text = text.replace((0, emoji_regex_1.default)(), ''); | ||
| return text; | ||
@@ -49,3 +49,3 @@ }; | ||
| const getBitbucketId = (text, repetition) => { | ||
| text = 'markdown-header-' + exports.getBasicGithubId(text); | ||
| text = 'markdown-header-' + (0, exports.getBasicGithubId)(text); | ||
| // BitBucket condenses consecutive hyphens (GitHub doesn't) | ||
@@ -73,3 +73,3 @@ text = text.replace(/--+/g, '-'); | ||
| const getGhostId = (text) => { | ||
| text = exports.getBasicGhostId(text); | ||
| text = (0, exports.getBasicGhostId)(text); | ||
| // Repetitions not supported | ||
@@ -111,3 +111,3 @@ return text; | ||
| return (hd, repetition) => { | ||
| return exports.getNodejsId(moduleName + '.' + hd, repetition); | ||
| return (0, exports.getNodejsId)(moduleName + '.' + hd, repetition); | ||
| }; | ||
@@ -147,7 +147,7 @@ case 'ghost.org': | ||
| }; | ||
| return exports.getEncodeUriMethod(mode)(exports.getReplaceMethod(mode, repetition, moduleName)(asciiOnlyToLowerCase(header.trim()), repetition)); | ||
| return (0, exports.getEncodeUriMethod)(mode)((0, exports.getReplaceMethod)(mode, repetition, moduleName)(asciiOnlyToLowerCase(header.trim()), repetition)); | ||
| }; | ||
| exports.getUrlHash = getUrlHash; | ||
| const anchor = (header, mode, repetition, moduleName) => '[' + header + '](#' + exports.getUrlHash(header, mode || 'github.com', repetition, moduleName) + ')'; | ||
| const anchor = (header, mode, repetition, moduleName) => '[' + header + '](#' + (0, exports.getUrlHash)(header, mode || 'github.com', repetition, moduleName) + ')'; | ||
| exports.anchor = anchor; | ||
| exports.default = exports.anchor; |
+8
-8
| { | ||
| "name": "@technote-space/anchor-markdown-header", | ||
| "version": "1.1.28", | ||
| "version": "1.1.29", | ||
| "description": "Generates an anchor for a markdown header.", | ||
@@ -50,12 +50,12 @@ "keywords": [ | ||
| "@types/jest": "^27.0.1", | ||
| "@types/node": "^16.7.1", | ||
| "@typescript-eslint/eslint-plugin": "^4.29.3", | ||
| "@typescript-eslint/parser": "^4.29.3", | ||
| "@types/node": "^16.7.8", | ||
| "@typescript-eslint/eslint-plugin": "^4.30.0", | ||
| "@typescript-eslint/parser": "^4.30.0", | ||
| "eslint": "^7.32.0", | ||
| "husky": "^7.0.1", | ||
| "jest": "^27.0.6", | ||
| "jest-circus": "^27.0.6", | ||
| "husky": "^7.0.2", | ||
| "jest": "^27.1.0", | ||
| "jest-circus": "^27.1.0", | ||
| "lint-staged": "^11.1.2", | ||
| "ts-jest": "^27.0.5", | ||
| "typescript": "^4.3.5" | ||
| "typescript": "^4.4.2" | ||
| }, | ||
@@ -62,0 +62,0 @@ "publishConfig": { |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
12848
0.31%