@overwolfp/brawl-stats-shared
v2.0.17
Published
Shared code for Brawl Stats app and web
Downloads
77
Readme
Brawl Stats Shared Code
These module provide code that we use across web and react native apps.
Installation
$ npm install @overwolfp/brawl-stats-shared --save
$ npm install moment-duration-format --save
Usage
stringToTag(hashtag: String) -> String
Transform string to correct form of hashtag (uppercased, without #) and change common user mistakes like "0" and "0". This method don't remove not allowed letters from string.
const hashtag = stringToTag('#ju8vc0On') // => 'JU8VC00N'
isValidTag(hashtag: String) -> Boolean
Check hashtag for not allowed letters.
const isValid = isValidTag('JU8VVLC8') // => true
$ npm ls -g --depth=0 --link=true
$ npm link
$ cd ../brawl-stats-frontend-github
$ npm link @overwolfp/brawl-stats-shared
# all links
$ npm ls -g --depth=0 --link=true
$ npm publish