Socket
Socket
Sign inDemoInstall

censoring

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

censoring - npm Package Compare versions

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! ';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc