node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



npm version Build Status

Roll different text variants from a base text. This technique (article text spinning) has its roots in SEO (not recommended for this) but can be used for many purposes, e.g.: personalized greetings.


spincontent("{hello|hi} {world|universe{s|}}")

Will return one of:

  • hello world
  • hello worlds
  • hello universe
  • hello universes
  • hi world
  • hi worlds
  • hi universe
  • hi universes