Comparing version 0.1.9 to 0.1.10
12
index.js
@@ -63,3 +63,3 @@ export function getCharCountsByKey(arr) { | ||
if (typeof sentence !== "string") { | ||
throw new Error("The paramater input should be string") | ||
throw new Error("The paramater input should be a string") | ||
} | ||
@@ -72,3 +72,3 @@ | ||
if (typeof sentence !== "string") { | ||
throw new Error("The paramater input should be string") | ||
throw new Error("The paramater input should be a string") | ||
} | ||
@@ -78,1 +78,9 @@ | ||
} | ||
export function stripTags(htmlString) { | ||
if (typeof htmlString !== "string") { | ||
throw new Error("The paramater input should be a string") | ||
} | ||
return htmlString.replace(/<[^>]*>/g, "") | ||
} |
{ | ||
"name": "pedash", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "A lodash-like javascript helper -- for dummies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -103,1 +103,14 @@ ## Pedash 🌶 | ||
``` | ||
#### stripTags(htmlString: string) | ||
``` | ||
import { stripTags } from pedash; | ||
// Then use it whatever you like | ||
const tags = "<p><em>Hello</em> <strong>world!</strong></p>" | ||
console.log(stripTags(tags)); | ||
// "Hello world!" | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4522
69
116