Skip to content

Commit

Permalink
better output for example
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan committed Sep 10, 2016
1 parent dc1c83a commit ea04177
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,20 @@ After installing `npm install octicons` you can access the icons like this.

```js
var octicons = require("octicons")
console.log(octicons.alert)
// { keywords: [ 'warning', 'triangle', 'exclamation', 'point' ], svg: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>' }
octicons.alert
// { keywords: [ 'warning', 'triangle', 'exclamation', 'point' ],
// path: '<path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/>',
// height: '16',
// width: '16',
// symbol: 'alert',
// options:
// { version: '1.1',
// width: '16',
// height: '16',
// viewBox: '0 0 16 16',
// class: 'octicon octicon-alert',
// 'aria-hidden': 'true' },
// toSVG: [Function] }
```

There will be a key for every icon, with `keywords` and `svg`.
Expand Down

0 comments on commit ea04177

Please sign in to comment.