Add tslint (#151)

This commit is contained in:
Jaco Greeff
2018-06-27 10:15:46 +02:00
committed by GitHub
parent 499a877f15
commit 73477a2809
134 changed files with 989 additions and 884 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
import stringShorten from './shorten';
/**
@summary Utility methods to convert to work with `string` values
*/
* @summary Utility methods to convert to work with `string` values
*/
export {
stringShorten
};
+10 -10
View File
@@ -3,16 +3,16 @@
// of the ISC license. See the LICENSE file for details.
/**
@name stringShorten
@signature stringShorten (value: any, prefixLength: number = 8): string
@summary Returns a string with maximum length
@description
Checks the string against the `prefixLength`, if longer than dopuble this, shortens it by placing `..` in the middle of it
@example
import { stringShorten } from '@polkadot/util';
stringShorten('1234567890', 2); // => 12..90
*/
* @name stringShorten
* @signature stringShorten (value: any, prefixLength: number = 8): string
* @summary Returns a string with maximum length
* @description
* Checks the string against the `prefixLength`, if longer than dopuble this, shortens it by placing `..` in the middle of it
* @example
* import { stringShorten } from '@polkadot/util';
*
* stringShorten('1234567890', 2); // => 12..90
*/
export default function stringShorten (_value: any, prefixLength: number = 6): string {
const value = `${_value}`;