Skip to content

Commit

Permalink
commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Aug 5, 2017
1 parent c716f12 commit 3f08c36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib/SLP').default
module.exports = require('./lib/SLP')
10 changes: 7 additions & 3 deletions src/SLP.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Struct, { types as t } from 'awestruct'
import createImageData from './createImageData'
const Struct = require('awestruct')
const createImageData = require('./createImageData')

const t = Struct.types

module.exports = SLP

// SLP commands
const SLP_END_OF_ROW = 0x0f
Expand Down Expand Up @@ -65,7 +69,7 @@ function polyFill (value, start, end) {
/**
* @param {Buffer} buf
*/
export default function SLP (buf) {
function SLP (buf) {
if (!(this instanceof SLP)) return new SLP(buf)

this.frames = []
Expand Down

0 comments on commit 3f08c36

Please sign in to comment.