Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var assert = require('nanoassert')
import assert from 'nanoassert'

var placeholder = {
cancel: noop,
Expand All @@ -11,9 +11,7 @@ var placeholder = {
}
}

module.exports = animate

function animate (keyframes, timingProperties) {
export default function animate (keyframes, timingProperties) {
assert.equal(typeof keyframes, 'object', 'nanoanimation: keyframes should be an array or an object')
assert.ok(typeof timingProperties === 'object' || typeof timingProperties === 'number', 'nanoanimation: timingProperties should be type object or number')

Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@
"description": "Safety wrapper around the Web Animation API",
"repository": "choojs/nanoanimation",
"version": "2.1.0",
"source": "index.js",
"main": "dist/nanoanimation.js",
"module": "dist/nanoanimation.mjs",
"scripts": {
"deps": "dependency-check . && dependency-check . --extra --no-dev",
"start": "node .",
"build": "microbundle -o dist -f cjs,es",
"prepublishOnly": "npm run build",
"pretest": "npm run build",
"test": "standard && npm run deps"
},
"dependencies": {
"nanoassert": "^1.1.0"
},
"devDependencies": {
"dependency-check": "^2.9.1",
"microbundle": "^0.6.0",
"standard": "^10.0.3",
"tape": "^4.8.0"
},
Expand Down