New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More β†’
Socket
Sign inDemoInstall
Socket

@imranbarbhuiya/decancer

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imranbarbhuiya/decancer - npm Package Compare versions

Comparing version 0.1.1-next.be1d0c3.0 to 0.1.1

9

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
# [0.1.1](https://github.com/imranbarbhuiya/decancer/compare/v0.1.0...v0.1.1) - (2022-05-30)
## 🏠 Refactor
- Simplify cancerous check (#4) ([60b77c1](https://github.com/imranbarbhuiya/decancer/commit/60b77c1d4940d5d43c651c6fe7be9d4a4e5d04f9))
### πŸ’₯ Breaking Changes:
# [0.1.0]

@@ -5,0 +14,0 @@ (https://github.com/imranbarbhuiya/decancer/tree/v0.1.0) - (2022-05-30)

5

dist/index.d.ts

@@ -1,4 +0,1 @@

declare const isAscii: (str: string) => boolean;
declare const isAlnum: (char: string) => boolean;
declare const decancer: (str: string) => string;

@@ -8,2 +5,2 @@

export { decancer, isAlnum, isAscii, isCancerous };
export { decancer, isCancerous };

17

dist/index.js

@@ -28,4 +28,2 @@ "use strict";

decancer: () => decancer,
isAlnum: () => isAlnum,
isAscii: () => isAscii,
isCancerous: () => isCancerous

@@ -35,6 +33,2 @@ });

// src/lib/utils/index.ts
var isAscii = /* @__PURE__ */ __name((str) => /^[\x00-\x7F]*$/.test(str), "isAscii");
var isAlnum = /* @__PURE__ */ __name((char) => /^[a-zA-Z0-9]$/.test(char), "isAlnum");
// src/lib/decancer.ts

@@ -52,10 +46,3 @@ var import_unidecode = __toESM(require("unidecode"));

var isCancerous = /* @__PURE__ */ __name((str) => {
for (const segment of str.split(/\s+/)) {
for (const char of segment) {
if (!(isAscii(char) && isAlnum(char))) {
return true;
}
}
}
return false;
return /[^\p{ASCII}]/u.test(str);
}, "isCancerous");

@@ -65,6 +52,4 @@ // Annotate the CommonJS export names for ESM import in node:

decancer,
isAlnum,
isAscii,
isCancerous
});
//# sourceMappingURL=index.js.map
{
"name": "@imranbarbhuiya/decancer",
"version": "0.1.1-next.be1d0c3.0",
"description": "A package to remove zalgo and common confusables from strings.",
"version": "0.1.1",
"description": "A package to remove zalgo and common confusable characters from strings.",
"main": "dist/index.js",

@@ -39,2 +39,5 @@ "module": "dist/index.mjs",

},
"dependencies": {
"unidecode": "^0.1.8"
},
"devDependencies": {

@@ -97,6 +100,3 @@ "@commitlint/cli": "^17.0.1",

"packageManager": "yarn@3.2.1",
"prettier": "@sapphire/prettier-config",
"dependencies": {
"unidecode": "^0.1.8"
}
"prettier": "@sapphire/prettier-config"
}

@@ -13,3 +13,3 @@ <div align="center">

A package to remove zalgo and common confusables from strings.
A package to remove zalgo and common confusable characters from strings.

@@ -33,3 +33,2 @@ Read Full Documentation [here](https://imranbarbhuiya.github.io/decancer).

npm i @imranbarbhuiya/decancer
```

@@ -40,5 +39,11 @@

```ts
import { decancer } from '@imranbarbhuiya/decancer';
import { decancer, isCancerous } from '@imranbarbhuiya/decancer';
const result = decancer('Hello World');
// Check if a string is cancerous
isCancerous('hello world'); // false
isCancerous('vοΌ₯ⓑ𝔂 π”½π•ŒΕ‡β„•ο½™ ţ乇𝕏𝓣'); // true
// Decancer a string
const result = decancer('HУPΞЯ_XD');
```

@@ -45,0 +50,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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