UNPKG
svga-loader
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.0
SVGA loader for Webpack.
github.com/Adamwu1992/svga-loader
Adamwu1992/svga-loader
svga-loader
/
src
/
parser
/
index.js
10 lines
(9 loc)
•
256 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
VideoEntity
=
require
(
'./VideoEntity'
)
const
parse =
require
(
'./core'
)
module
.
exports
=
function
(
source
) {
if
(
typeof
source ===
'string'
) { source =
Buffer
.
from
(source) }
const
data =
parse
(source)
return
data &&
new
VideoEntity
(data) }