Comparing version 1.0.4 to 1.0.5
@@ -9,2 +9,10 @@ "use strict"; | ||
var identified = identify_1.default(arr, options); | ||
// custom filtering-out function | ||
if (options.exclude) { | ||
for (var index = 0; index < identified.length; index++) { | ||
var element = identified[index]; | ||
if (typeof element === "object" && options.exclude(element)) | ||
identified[index] = element.raw; | ||
} | ||
} | ||
// return the current list (with words being filtered out) | ||
@@ -11,0 +19,0 @@ if (options.list) { |
@@ -23,2 +23,3 @@ export interface AttributeObj { | ||
list?: boolean; | ||
exclude?: (URLObj) => boolean; | ||
} | ||
@@ -25,0 +26,0 @@ /** |
{ | ||
"name": "anchorme", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A library to convert URLs to a clickable HTML anchor elements", | ||
@@ -10,3 +10,4 @@ "main": "./dist-node/index.js", | ||
"bench": "node benchmark/bench", | ||
"build": "node build/build" | ||
"build": "node build/build", | ||
"prepublish": "npm run test && npm run bench && npm run build" | ||
}, | ||
@@ -13,0 +14,0 @@ "repository": { |
35716
549