Skip to content

Commit

Permalink
Merge pull request #14 from dl-tokene/fix/abbreviate-center
Browse files Browse the repository at this point in the history
fix abbrCenter
  • Loading branch information
ArtSuslov authored Aug 10, 2023
2 parents 1cfe54c + 4947e63 commit 1b25eb5
Show file tree
Hide file tree
Showing 9 changed files with 1,450 additions and 1,184 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.0-rc.18] - 2023-08-10
### Fixed
- `@tokene/toolkit` - `abbrCenter` function

## [0.0.0-rc.17] - 2023-06-17
### Changed
- `@tokene/toolkit` - EventBus
Expand Down Expand Up @@ -160,7 +164,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release
- `root` - `@tokene/toolkit` package

[Unreleased]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.17...HEAD
[Unreleased]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.18...HEAD
[0.0.0-rc.18]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.17...0.0.0-rc.18
[0.0.0-rc.17]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.16...0.0.0-rc.17
[0.0.0-rc.16]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.15...0.0.0-rc.16
[0.0.0-rc.15]: https://github.com/dl-tokene/webkit/compare/0.0.0-rc.14...0.0.0-rc.15
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/sdk",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "Collection of common interactions with TokenE graph and core contracts",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/styles",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "Default styles for every single frontend module of TokenE",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/toasts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/toasts",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "Vue based toasts",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/toolkit",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "Collection of common utility functions and classes in tokenE frontend modules",
"repository": {
"type": "git",
Expand Down
9 changes: 3 additions & 6 deletions packages/toolkit/src/helpers/text.helpers.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
export function abbrCenter(text: string, reduceValue = 8): string {
if (text.length <= 10) {
export function abbrCenter(text = '', reduceValue = 4): string {
if (text.length <= reduceValue * 2) {
return text
}
return `${text.slice(0, reduceValue)}...${text.slice(
text.length - reduceValue,
text.length,
)}`
return `${text.slice(0, reduceValue)}...${text.slice(-reduceValue)}`
}

export function extractRootDomain(url: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/ui-kit",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "Collection of common TokenE vue components",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-web3-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokene/vue-web3-provider",
"version": "0.0.0-rc.17",
"version": "0.0.0-rc.18",
"description": "The Vue reactive wrapper for @distributedlab/w3p",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 1b25eb5

Please sign in to comment.