mining-utils
Advanced tools
Comparing version 0.4.7 to 0.4.8
@@ -1,1 +0,1 @@ | ||
"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; | ||
"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")];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.7", | ||
"version": "0.4.8", | ||
"description": "", | ||
@@ -16,3 +16,3 @@ "author": "Oracy Rezende Martos <oramartos_21@hotmail.com> (https://github.com/Oracy)", | ||
"build:transpile": "npx tsc", | ||
"build:clean": "mv dist/index.d.ts ./ && rm -rf dist/", | ||
"build:clean": "rm -rf dist/", | ||
"build:after": "ts-node src/util/changeDir.ts", | ||
@@ -19,0 +19,0 @@ "start": "npm run build" |
import { readFileSync, writeFileSync } from 'fs'; | ||
import { join } from 'path'; | ||
const files: any[] = [join('index.js'), join('index.d.ts')] | ||
const files: any[] = [join('index.js')] | ||
// const files: any[] = [join('index.js'), join('index.d.ts')] | ||
@@ -6,0 +7,0 @@ for (const file of files) { |
@@ -6,3 +6,3 @@ { | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"declaration": false, | ||
"outDir": "./dist" | ||
@@ -9,0 +9,0 @@ }, |
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
20911
18
223