1.0.49 • Published 6 months ago
@kamen/create-webapp v1.0.49
@kamen/create-webapp

Project Scaffolding (wip)
$ npm init @kamen/webappUtility Functions
Basic example
import {
createRandomFromRange,
createRandomFromList,
createRandomColorFromSaturationLightnessAlpha
} from '@kamen/create-webapp';
const characters = Array
.from({length: 26}, (_, index) => [
String.fromCharCode(65 + index),
String.fromCharCode(97 + index)
])
.flat();
const ageHandler = createRandomFromRange(0, 99);
const colorHandler = createRandomFromList(['red', 'green', 'blue']);
const stateHandler = createRandomFromList([true, false]);
const identHandler = createRandomFromList(characters);
const identFormatHandler = () => Array
.from({length: 1 << 5}, identHandler)
.join('');
const data = Array
.from({length: 1 << 8}, (_, index) => ({
index,
age: ageHandler(),
color: colorHandler(),
state: stateHandler(),
ident: identFormatHandler()
}));
console.dir(data);Dynamic import from CDN
const {
createRandomFromList
} = await import('https://esm.run/@kamen/create-webapp');
function createAlphabet() {
const baseChar = 'a';
const lowerCode = baseChar.charCodeAt();
const upperCode = baseChar.toUpperCase().charCodeAt();
const length = 'z'.charCodeAt() - lowerCode + 1;
return Array
.from({length}, (_, index) => [
String.fromCharCode(lowerCode + index),
String.fromCharCode(upperCode + index)
])
.flat();
}
const identHandler = createRandomFromList(createAlphabet());
const identFormatHandler = () => Array
.from({length: 1 << 5}, identHandler)
.join('');
console.log(identFormatHandler());Advanced example
1.0.26
12 months ago
1.0.29
12 months ago
1.0.28
12 months ago
1.0.27
12 months ago
1.0.33
12 months ago
1.0.32
12 months ago
1.0.31
12 months ago
1.0.30
12 months ago
1.0.37
12 months ago
1.0.36
12 months ago
1.0.35
12 months ago
1.0.34
12 months ago
1.0.39
8 months ago
1.0.38
12 months ago
1.0.40
8 months ago
1.0.44
7 months ago
1.0.43
7 months ago
1.0.42
7 months ago
1.0.41
8 months ago
1.0.48
6 months ago
1.0.47
6 months ago
1.0.46
6 months ago
1.0.45
7 months ago
1.0.49
6 months ago
1.0.25
12 months ago
1.0.24
12 months ago
1.0.19
12 months ago
1.0.18
12 months ago
1.0.17
12 months ago
1.0.16
12 months ago
1.0.22
12 months ago
1.0.21
12 months ago
1.0.20
12 months ago
1.0.15
12 months ago
1.0.23
12 months ago
1.0.14
1 year ago
1.0.12
1 year ago
1.0.9
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago