slugify

Alias to slice method.

Install

Install all functions of strman

yarn add strman

or just the slugify function

yarn add strman.slugify

Usage

import { slugify } from 'strman'
// OR
import slugify from 'strman.slugify'
Parameters:
Name Type Description
value String

The String!

beginSlice Number

Start of slice.

endSlice Number

End of slice.

Source:
Returns:

The String sliced!

Type
String
Example
const title = 'strman'
slice(title, 2, 5)
// => 'rma'
Parameters:
Name Type Description
value String

The value to slugify

Source:
Returns:

The slugified value

Type
String
Example
const title = 'A Javascript string manipulation library.'
slugify(title)
// => 'a-javascript-string-manipulation-library'

Converts a value to a slug.

Install

Install all functions of strman

yarn add strman

or just the slugify function

yarn add strman.slugify

Usage

import { slugify } from 'strman'
// OR
import slugify from 'strman.slugify'
Parameters:
Name Type Description
value String

The String!

beginSlice Number

Start of slice.

endSlice Number

End of slice.

Source:
Returns:

The String sliced!

Type
String
Example
const title = 'strman'
slice(title, 2, 5)
// => 'rma'
Parameters:
Name Type Description
value String

The value to slugify

Source:
Returns:

The slugified value

Type
String
Example
const title = 'A Javascript string manipulation library.'
slugify(title)
// => 'a-javascript-string-manipulation-library'