mining-utils
Advanced tools
Comparing version 0.4.4 to 0.4.5
@@ -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/" | ||
] | ||
} |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
21012
224
3
1