UNPKG
sassdoc-extras
Version:
beta (2.0.0-rc.4)
latest (3.0.0)
3.0.0
2.5.1
2.5.0
2.4.3
2.4.2
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.1.1
2.1.0
2.0.0
2.0.0-rc4
2.0.0-rc3
2.0.0-rc2
2.0.0-rc1
2.0.0-rc.10
2.0.0-rc.4
2.0.0-rc.2
2.0.0-rc.1
1.0.3
1.0.2
1.0.1
1.0.0
SassDoc's Toolbelt
sassdoc.com
SassDoc/sassdoc-extras
sassdoc-extras
/
src
/
byType.js
18 lines
(12 loc)
•
254 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
module
.
exports
=
function
byType
(
data
) {
var
sorted = {} data.
forEach
(
function
(
item
) {
var
type
= item.
context
.
type
if
(!(
type
in
sorted)) { sorted[
type
] = [] } sorted[
type
].
push
(item) })
return
sorted }