fast-check
Version:
Property based testing framework for JavaScript (like QuickCheck)
7 lines (6 loc) • 398 B
JavaScript
import { buildAlphaNumericPercentArbitrary } from './_internals/builders/CharacterRangeArbitraryBuilder.js';
import { stringOf } from './stringOf.js';
export function webSegment(constraints = {}) {
const others = ['-', '.', '_', '~', '!', '$', '&', "'", '(', ')', '*', '+', ',', ';', '=', ':', '@'];
return stringOf(buildAlphaNumericPercentArbitrary(others), { size: constraints.size });
}