Comparing version 0.0.1 to 0.0.2
34
index.js
@@ -5,7 +5,7 @@ ; | ||
/** | ||
* The TextScan object constructor. | ||
* The Censoring object constructor. | ||
* | ||
* @constructor | ||
*/ | ||
function TextScan() { | ||
function Censoring() { | ||
@@ -89,3 +89,3 @@ /** | ||
TextScan.prototype = { | ||
Censoring.prototype = { | ||
@@ -124,3 +124,3 @@ /** | ||
* @param {String} filter | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -141,4 +141,4 @@ enableFilter: function (filter) { | ||
* @param {Array} filters | ||
* @returns {TextScan} | ||
* @see TextScan.enableFilter | ||
* @returns {Censoring} | ||
* @see Censoring.enableFilter | ||
*/ | ||
@@ -161,3 +161,3 @@ enableFilters: function (filters) { | ||
* @param {String} filter | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -178,3 +178,3 @@ disableFilter: function (filter) { | ||
* @param {[]} words | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -197,3 +197,3 @@ addFilterWords: function (words) { | ||
* @param {String} word | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -240,3 +240,3 @@ addFilterWord: function (word) { | ||
* @param {String} str | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -274,3 +274,3 @@ setReplacementString: function (str) { | ||
* @param {Boolean} highlight | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -287,3 +287,3 @@ prepare: function (str, highlight) { | ||
* | ||
* @returns {TextScan} | ||
* @returns {Censoring} | ||
*/ | ||
@@ -349,7 +349,7 @@ replace: function () { | ||
/* | ||
* Make sure TextScan is loadable through amd. | ||
* Make sure Censoring is loadable through amd. | ||
*/ | ||
if (typeof define === 'function' && define.amd) { | ||
define([], function () { | ||
return TextScan; | ||
return Censoring; | ||
}); | ||
@@ -361,3 +361,3 @@ | ||
if (typeof module === 'object') { | ||
module.exports = TextScan; | ||
module.exports = Censoring; | ||
@@ -368,5 +368,5 @@ return; | ||
/* | ||
* Make sure TextScan is accessible beyond our scope. | ||
* Make sure Censoring is accessible beyond our scope. | ||
*/ | ||
window.TextScan = TextScan; | ||
window.Censoring = Censoring; | ||
})(); |
{ | ||
"name": "censoring", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Censor or highlight words and other patterns intelligently.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,2 +14,5 @@ # Censoring | ||
// Enable filters we want to use | ||
scan.enableFilters(['phone_number', 'email_address', 'words']); | ||
// Word | ||
@@ -16,0 +19,0 @@ testSentence += 'The 1nt3r.n.e.t will not be censored! '; |
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
15407
208