@designliquido/delegua 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@designliquido/delegua",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Linguagem de programação simples e moderna usando português",
5
5
  "main": "index.ts",
6
6
  "scripts": {
7
7
  "empacotar": "rm -Rf ./dist && tsc && copyfiles -V ./bin/delegua ./bin/delegua.cmd ./dist && copyfiles -V ./package.json ./dist/bin && copyfiles -V ./README.md ./dist",
8
+ "lair": "ts-node index.ts",
8
9
  "publicar-npm": "npm publish ./dist --access public",
9
10
  "testes": "./bin/delegua-ts testes/exemplos/testes.egua",
10
11
  "testes:delegua:bhaskara": "./bin/delegua-ts testes/exemplos/dialetos/egua-classico/bhaskara.egua",
@@ -1,9 +1,10 @@
1
1
  declare const _default: {
2
+ inclui: (texto: string, elemento: any) => boolean;
2
3
  minusculo: (texto: string) => string;
3
4
  maiusculo: (texto: string) => string;
4
- inclui: (texto: string, elemento: any) => boolean;
5
5
  substituir: (texto: string, elemento: string, substituto: string) => string;
6
6
  subtexto: (texto: string, inicio: number, fim: number) => string;
7
+ fatiar: (texto: string, inicio: number, fim: number) => string;
7
8
  dividir: (texto: string, divisor: any, limite: number) => string[];
8
9
  };
9
10
  export default _default;
@@ -10,11 +10,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.default = {
13
+ 'inclui': function (texto, elemento) { return texto.includes(elemento); },
13
14
  'minusculo': function (texto) { return texto.toLowerCase(); },
14
15
  'maiusculo': function (texto) { return texto.toUpperCase(); },
15
- 'inclui': function (texto, elemento) { return texto.includes(elemento); },
16
16
  "substituir": function (texto, elemento, substituto) { return texto.replace(elemento, substituto); },
17
17
  "subtexto": function (texto, inicio, fim) { return texto.slice(inicio, fim); },
18
+ "fatiar": function (texto, inicio, fim) { return texto.slice(inicio, fim); },
18
19
  "dividir": function (texto, divisor, limite) { return (__spreadArray([], texto.split(divisor, limite), true)); },
19
20
  };
20
21
  //# sourceMappingURL=primitivas-texto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitivas-texto.js","sourceRoot":"","sources":["../../../fontes/bibliotecas/primitivas-texto.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kBAAe;IACX,WAAW,EAAE,UAAC,KAAa,IAAK,OAAA,KAAK,CAAC,WAAW,EAAE,EAAnB,CAAmB;IACnD,WAAW,EAAE,UAAC,KAAa,IAAK,OAAA,KAAK,CAAC,WAAW,EAAE,EAAnB,CAAmB;IACnD,QAAQ,EAAE,UAAC,KAAa,EAAE,QAAa,IAAK,OAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAxB,CAAwB;IACpE,YAAY,EAAE,UAAC,KAAa,EAAE,QAAgB,EAAE,UAAkB,IAAK,OAAA,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAnC,CAAmC;IAC1G,UAAU,EAAE,UAAC,KAAa,EAAE,MAAc,EAAE,GAAW,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,EAAxB,CAAwB;IACpF,SAAS,EAAE,UAAC,KAAa,EAAE,OAAY,EAAE,MAAc,IAAK,OAAA,mBAAK,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,QAAE,EAAnC,CAAmC;CAClG,CAAA"}
1
+ {"version":3,"file":"primitivas-texto.js","sourceRoot":"","sources":["../../../fontes/bibliotecas/primitivas-texto.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kBAAe;IACX,QAAQ,EAAE,UAAC,KAAa,EAAE,QAAa,IAAK,OAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAxB,CAAwB;IACpE,WAAW,EAAE,UAAC,KAAa,IAAK,OAAA,KAAK,CAAC,WAAW,EAAE,EAAnB,CAAmB;IACnD,WAAW,EAAE,UAAC,KAAa,IAAK,OAAA,KAAK,CAAC,WAAW,EAAE,EAAnB,CAAmB;IACnD,YAAY,EAAE,UAAC,KAAa,EAAE,QAAgB,EAAE,UAAkB,IAAK,OAAA,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAnC,CAAmC;IAC1G,UAAU,EAAE,UAAC,KAAa,EAAE,MAAc,EAAE,GAAW,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,EAAxB,CAAwB;IACpF,QAAQ,EAAE,UAAC,KAAa,EAAE,MAAc,EAAE,GAAW,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,EAAxB,CAAwB;IAClF,SAAS,EAAE,UAAC,KAAa,EAAE,OAAY,EAAE,MAAc,IAAK,OAAA,mBAAK,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,QAAE,EAAnC,CAAmC;CAClG,CAAA"}
@@ -1,11 +1,14 @@
1
1
  declare const _default: {
2
2
  inclui: (vetor: Array<any>, elemento: any) => boolean;
3
- juntar: (vetor: Array<any>, separador: any) => string;
4
- removerUltimo: (vetor: Array<any>) => any;
5
- removerPrimeiro: (vetor: Array<any>) => any;
6
- empilhar: (vetor: Array<any>, elemento: any) => number;
3
+ juntar: (vetor: Array<any>, separador: string) => string;
4
+ removerUltimo: (vetor: Array<any>) => any[];
5
+ removerPrimeiro: (vetor: Array<any>) => any[];
6
+ empilhar: (vetor: Array<any>, elemento: any) => any[];
7
+ adicionar: (vetor: Array<any>, elemento: any) => any[];
7
8
  inverter: (vetor: Array<any>) => any[];
8
- fatia: (vetor: Array<any>, inicio: number, fim: number) => any[];
9
+ fatiar: (vetor: Array<any>, inicio: number, fim: number) => any[];
9
10
  ordenar: (vetor: Array<any>) => any[];
11
+ somar: (vetor: Array<number>) => number;
12
+ remover: (vetor: Array<any>, elemento: any) => any[];
10
13
  };
11
14
  export default _default;
@@ -3,11 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  'inclui': function (vetor, elemento) { return vetor.includes(elemento); },
5
5
  'juntar': function (vetor, separador) { return vetor.join(separador); },
6
- 'removerUltimo': function (vetor) { return vetor.pop(); },
7
- 'removerPrimeiro': function (vetor) { return vetor.shift(); },
8
- 'empilhar': function (vetor, elemento) { return vetor.push(elemento); },
6
+ 'removerUltimo': function (vetor) { vetor.pop(); return vetor; },
7
+ 'removerPrimeiro': function (vetor) { vetor.shift(); return vetor; },
8
+ 'empilhar': function (vetor, elemento) { vetor.push(elemento); return vetor; },
9
+ 'adicionar': function (vetor, elemento) { vetor.push(elemento); return vetor; },
9
10
  'inverter': function (vetor) { return vetor.reverse(); },
10
- 'fatia': function (vetor, inicio, fim) { return vetor.slice(inicio, fim); },
11
+ 'fatiar': function (vetor, inicio, fim) { return vetor.slice(inicio, fim); },
11
12
  'ordenar': function (vetor) { return vetor.sort(); },
13
+ 'somar': function (vetor) { return vetor.reduce(function (a, b) { return a + b; }); },
14
+ 'remover': function (vetor, elemento) {
15
+ var index = vetor.indexOf(elemento);
16
+ if (index !== -1)
17
+ vetor.splice(index, 1);
18
+ return vetor;
19
+ },
12
20
  };
13
21
  //# sourceMappingURL=primitivas-vetor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitivas-vetor.js","sourceRoot":"","sources":["../../../fontes/bibliotecas/primitivas-vetor.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX,QAAQ,EAAE,UAAC,KAAiB,EAAE,QAAa,IAAK,OAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAxB,CAAwB;IACxE,QAAQ,EAAE,UAAC,KAAiB,EAAE,SAAc,IAAK,OAAA,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAArB,CAAqB;IACtE,eAAe,EAAE,UAAC,KAAiB,IAAK,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QAAa,IAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC;IAC1F,UAAU,EAAE,UAAC,KAAiB,IAAK,OAAA,KAAK,CAAC,OAAO,EAAE,EAAf,CAAe;IAClD,QAAQ,EAAE,UAAC,KAAiB,EAAE,MAAc,EAAE,GAAW,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,EAAxB,CAAwB;IACtF,SAAS,EAAE,UAAC,KAAiB,IAAK,OAAA,KAAK,CAAC,IAAI,EAAE,EAAZ,CAAY;IAC9C,OAAO,EAAE,UAAC,KAAoB,IAAK,OAAA,KAAK,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK,CAAC,EAA7B,CAA6B;IAChE,SAAS,EAAE,UAAC,KAAiB,EAAE,QAAa;QACxC,IAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@designliquido/delegua",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Linguagem de programação simples e moderna usando português",
5
5
  "main": "index.ts",
6
6
  "scripts": {
7
7
  "empacotar": "rm -Rf ./dist && tsc && copyfiles -V ./bin/delegua ./bin/delegua.cmd ./dist && copyfiles -V ./package.json ./dist/bin && copyfiles -V ./README.md ./dist",
8
+ "lair": "ts-node index.ts",
8
9
  "publicar-npm": "npm publish ./dist --access public",
9
10
  "testes": "./bin/delegua-ts testes/exemplos/testes.egua",
10
11
  "testes:delegua:bhaskara": "./bin/delegua-ts testes/exemplos/dialetos/egua-classico/bhaskara.egua",