add create module
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import * as create from './smartstring.create'
|
||||
import * as docker from './smartstring.docker'
|
||||
import * as indent from './smartstring.indent'
|
||||
import * as normalize from './smartstring.normalize'
|
||||
import * as typescript from './smartstring.typescript'
|
||||
|
||||
export {
|
||||
create,
|
||||
docker,
|
||||
typescript,
|
||||
normalize,
|
||||
|
13
ts/smartstring.create.ts
Normal file
13
ts/smartstring.create.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import * as plugins from './smartstring.plugins'
|
||||
|
||||
export let createRandomString = (
|
||||
patternArg: string,
|
||||
lengthArg: number,
|
||||
optionsArg: any
|
||||
): string => {
|
||||
return plugins.randomatic(patternArg, lengthArg, optionsArg)
|
||||
}
|
||||
|
||||
export let createCryptoRandomString = (lengthArg): string => {
|
||||
return plugins.cryptoRandomString(lengthArg)
|
||||
}
|
@ -13,7 +13,7 @@ export class Domain {
|
||||
topLevel: string
|
||||
domainName
|
||||
subDomain
|
||||
constructor(domainStringArg: string) {
|
||||
constructor (domainStringArg: string) {
|
||||
let regexMatches = domainRegex(domainStringArg);
|
||||
this.fullName = ''
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
|
@ -3,3 +3,5 @@ export let jsBase64 = require('js-base64').Base64
|
||||
|
||||
export let stripIndent = require('strip-indent')
|
||||
export let normalizeNewline = require('normalize-newline')
|
||||
export let randomatic = require('randomatic')
|
||||
export let cryptoRandomString = require('crypto-random-string')
|
||||
|
Reference in New Issue
Block a user