JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7876
  • Score
    100M100P100Q120110F
  • License MIT

Slugify a React node

Package Exports

  • react-slugify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-slugify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-slugify

Slugify a React node

Usage

slugify(node)
Parameters:

node
A react Node

Examples

import slugify from 'react-slugify';

slugify('something I want to test');
// "something-i-want-to-test"

slugify(<span>Yes it works like that too</span>);
// -> "yes-it-works-like-that-too"

slugify(
  <>
    <span>and</span>
    <span>with</span>
    <span>fragments or arrays</span>
  </>
);
// -> "and-with-fragments-or-arrays"