Skip to content
Snippets Groups Projects
Commit 745df34e authored by Millicent Billette's avatar Millicent Billette
Browse files

Bump to v3.1.0

parent d9c9d253
Branches
Tags v3.1.0
No related merge requests found
Pipeline #11876 failed
......@@ -8,11 +8,15 @@ et ce projet adhère au [versionnage sémantique](https://semver.org/spec/v2.0.0
## Evolutions probable / Roadmap :
- GraphQL stuff
- ::: comme séparateur entre identifiant secret et mdp pour la génération de combinaison à tester (usage principal Gsper)
- @@@@ comme séparateur entre identifiant secret et mdp pour la génération de combinaison à tester (usage principal Gsper)
- supprimer automatiquement le code inutile dans les lib (Tree Shaking)
## [Non-publié/Non-Stabilisé] (par [1000i100])
## [Version 3.1.0] - 2021-04-01 (par [1000i100] && [Hugo])
### Ajouté
- génération du [format court d'affichage de pubKey](https://forum.duniter.org/t/format-de-checksum/7616)
## [Version 3.0.2] - 2020-12-10 (par [1000i100])
### Ajouté
- minification des modules g1lib
......@@ -68,3 +72,4 @@ et ce projet adhère au [versionnage sémantique](https://semver.org/spec/v2.0.0
[Version 1.0.1 (Proof of Concept)]: https://framagit.org/1000i100/gsper/-/tree/v1.0.1
[1000i100]: https://framagit.org/1000i100 "@1000i100"
[Hugo]: https://trentesaux.fr/
{
"name": "g1lib",
"version": "3.0.2",
"version": "3.1.0",
"description": "An ubiquitous static javascript toolbox lib for Ǧ1 / Duniter ecosystem with reliability in mind.",
"main": "all.mjs",
"author": {
......
export class Dictionary {
constructor(dictionaryString) {
this.properties = initProperties(dictionaryString);
incorporate(this, this.properties);
}
}
export function initProperties(dictionaryString) {
if (!dictionaryString) return {};
const properties = {
length: 81,
extraLength: 90
};
return properties;
}
export default Dictionary;
function incorporate(target, toAdd) {
for (const key in toAdd) {
target[key] = toAdd[key];
}
}
import test from 'ava';
import * as app from './dictionary.mjs';
test('get dictionary length', t => {
const dictionaryString = '(a|b|c)d(e|f|g)';
const dico = new app.Dictionary(dictionaryString);
t.is(dico.length, 81);
});
test('get dictionary extraLength', t => {
const dictionaryString = '(a|b|c)d(e|f|g)';
const dico = new app.Dictionary(dictionaryString);
t.true(dico.extraLength >= 81);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment