slugify 0.1.0 copy "slugify: ^0.1.0" to clipboard
slugify: ^0.1.0 copied to clipboard

outdatedDart 1 only

Converts strings into slugs, for pretty URLs

example/slugify_example.dart

import 'package:slugify/slugify.dart';

void main() {

  // slugify instances with different config
  Slugify slugify1 = new Slugify();
  Slugify slugify2 = new Slugify(lowercase: false);
  Slugify slugify3 = new Slugify(delimiter: '*');
  Slugify slugify4 = new Slugify(delimiter: ' ಠ_ಠ ', lowercase: false);

  print( slugify1.slugify('This is a standard post title') );
  print( slugify1.slugify('Robert\'); DROP TABLE Students;--') );
  print( slugify2.slugify('NO I CAN\'T **STOP** {YELL}ING CAUSE THAT\'S HOW I TALK!') );
  print( slugify3.slugify('u wot m8? i\'ll hook u in   \\the\\ (gabber) m8 i sw/er on `me` m.u.m.') );
  print( slugify4.slugify('VOULEZ-VOUS COUCHER AVEC MOI, s\'il te plaît?') );

}
44
likes
0
pub points
95%
popularity

Publisher

unverified uploader

Converts strings into slugs, for pretty URLs

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on slugify