Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1 KB

Readme.md

File metadata and controls

53 lines (31 loc) · 1 KB

NPM version Build Status

rating

Read-only numeric rating (0-100) displayed as stars. Click here to see the example.

Installation

$ npm install ro-rating

API

rating(el, value)

Add rating component to el and display the value

rating(el, options)

options is an object that allows specifying alternative star character and/or initial value

var rating = require('rating');

// use ★ and initial value 25
rating(parent, 25);

// use ❤ and initial value 50
rating(parent, {
  value: 50,
  star: '❤'  // ❤
});

rating.set(value)

Change the value of existing rating.

License

MIT

MIT © Damian Krzeminski