sanitize_filename

Last updated:

0 purchases

sanitize_filename Image
sanitize_filename Images
Add to Cart

Description:

sanitize filename

Dart package, which is a clone of the popular sanitize-filename npm module by Parsha Pourkhomami.
Usage #
import 'package:sanitize_filename/sanitize_filename.dart';

void main() {
const unsafeUserInput = "~/.\u0000ssh/authorized_keys";

final safeUserInput1 = sanitizeFilename(unsafeUserInput);
final safeUserInput2 = sanitizeFilename(unsafeUserInput, replacement: '-');

// "~.sshauthorized_keys"
print("safeUserInput1: $safeUserInput1");
// "~-.-ssh-authorized_keys"
print("safeUserInput2: $safeUserInput2");
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.