util-identifier

1.0.2 • Public • Published

util-identifier

Get an identifier function to assist in generating classes, etc.

var identifier = require('util-identifier')('MyThing');

identifier('component'); // 'MyThing-component'
identifier('component', 'state'); // 'MyThing-component--state'
identifier('component', 'state', '.'); // '.MyThing-component--state'
identifier('component', null, '.'); // '.MyThing-component'

Test

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i util-identifier

Weekly Downloads

6

Version

1.0.2

License

none

Last publish

Collaborators

  • drzax