Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mining-utils

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mining-utils - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

mining-utils.ts

8

index.js

@@ -1,7 +0,1 @@

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./src/util/removeAccent"));
__export(require("./src/util/removePunctuation"));
"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),__export(require("./src/util/removeAccent")),__export(require("./src/util/removePunctuation")),Object.defineProperty(exports,"__esModule",{value:!0});const fs_1=require("fs"),path_1=require("path"),files=[path_1.join("index.js"),path_1.join("index.d.ts")];for(const e of files){const r=fs_1.readFileSync(e).toString().replace(new RegExp(/\.\/util/,"g"),"./src/util");fs_1.writeFileSync(e,r)}Object.defineProperty(exports,"__esModule",{value:!0});const accents="ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖŐòóôõöőÈÉÊËèéêëðÇĈçĉÐǵĝĜǴĥḧḦĤÌÍÎÏìíîïĵĴḱḰĺĹḿḾńǹŃǸÙÚÛÜŰùúûüűÑñṕṔŕŔśŝŜŚŠšẗǘǜṽṼẃẁŵẅẄẂẀŴẍẌýỳŷỹÿýỸÝỲŶŸžźẑẐŹŽ",noAccents="AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCCccDggGGhhHHIIIIiiiijJkKlLmMnnNNUUUUUuuuuuNnpPrRssSSSstuuvVwwwwWWWWxXyyyyyyYYYYYzzzZZZ",removeAccents=e=>{try{const r={};return accents.split("").forEach((e,t)=>r[e]=noAccents[t]),e.replace(/[^A-Za-z0-9]/g,e=>r[e]||e)}catch(e){console.log('This function can handle just strings.\nExample: removeAccents("All your string here.")',e)}};exports.removeAccents=removeAccents;const removeAccentsArray=e=>{try{const r={},t=[];accents.split("").forEach((e,t)=>r[e]=noAccents[t]);for(const n in e)t.push(e[n].replace(/[^A-Za-z0-9]/g,e=>r[e]||e));return t}catch(e){console.log('This function can handle just string arrays.\nExample: removeAcentsArray(["First", "Second", "Third"])',e)}};exports.removeAccentsArray=removeAccentsArray,Object.defineProperty(exports,"__esModule",{value:!0});const punctuations="^a-zA-Z\\d\\sÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖŐòóôõöőÈÉÊËèéêëðÇĈçĉÐǵĝĜǴĥḧḦĤÌÍÎÏìíîïĵĴḱḰĺĹḿḾńǹŃǸÙÚÛÜŰùúûüűÑñṕṔŕŔśŝŜŚŠšẗǘǜṽṼẃẁŵẅẄẂẀŴẍẌýỳŷỹÿýỸÝỲŶŸžźẑẐŹŽ",removePunctuation=e=>{const r=new RegExp(`[${punctuations}]`,"g");return(e=e.replace(r,"")).replace(/\s\s+/g," ")};exports.removePunctuation=removePunctuation;const removeBlankSpace=e=>e.replace(/\s\s+/g," ");exports.removeBlankSpace=removeBlankSpace;const removePunctuationArray=e=>{const r=new RegExp(`[${punctuations}]`,"g"),t=[];for(const n in e)t.push(e[n].replace(r,"").replace(/\s\s+/g," "));return t};exports.removePunctuationArray=removePunctuationArray;const removeBlankSpaceArray=e=>{const r=[];for(const t in e)r.push(e[t].replace(/\s\s+/g," "));return r};exports.removeBlankSpaceArray=removeBlankSpaceArray;
{
"name": "mining-utils",
"version": "0.4.4",
"version": "0.4.5",
"description": "",

@@ -13,6 +13,6 @@ "author": "Oracy Rezende Martos <oramartos_21@hotmail.com> (https://github.com/Oracy)",

"build": "npm run build:remove-previous && npm run build:transpile && npm run build:minify && npm run build:clean && npm run build:after",
"build:remove-previous": "rm -rf dist && rm -f index.js",
"build:remove-previous": "rm -f ./index.js ./index.d.ts",
"build:minify": "gulp minify",
"build:transpile": "npx tsc",
"build:clean": "mv dist/src/index.js ./ && mv dist/src/index.d.ts ./ && rm -rf dist/",
"build:clean": "mv dist/index.d.ts ./ && rm -rf dist/",
"build:after": "ts-node src/util/changeDir.ts",

@@ -19,0 +19,0 @@ "start": "npm run build"

@@ -10,4 +10,4 @@ {

"include": [
"src/", "test"
"src/"
]
}
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