static-tag-cloud

1.0.3 • Public • Published

Static Tag Cloud

A deterministic tag cloud generator which always gives the same output upon the same input.

Install

$ npm install --save static-tag-cloud

Usage

import tagCloud from 'static-tag-cloud'

tagCloud([
  { id: 'apple', count: 1 },
  { id: 'boy', count: 2 },
  { id: 'cat', count: 4 },
  { id: 'dog', count: 1 }
])

/*
[
  { bucket: 2, id: 'apple', count: 1 },
  { bucket: 2, id: 'dog', count: 1 },
  { bucket: 2, id: 'boy', count: 2 },
  { bucket: 4, id: 'cat', count: 4 }
]
*/

Readme

Keywords

Package Sidebar

Install

npm i static-tag-cloud

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • cherrry