Socket
Socket
Sign inDemoInstall

animatify

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    animatify

A CommonJS wrapper for Animate.css for use with Browserify


Version published
Maintainers
1
Install size
6.98 kB
Created

Changelog

Source

1.0.2

  • Fix IE 11 issue (Fabio Ricali)

Readme

Source

Animatify

SemVer License

A CommonJS utility for Animate.css for use with Browserify.

  • No dependencies.
  • Use in a modern browser.

Install

npm install animatify --save

Usage

var animate = require('animatify');

var element = document.querySelector('h1');
animate(element, 'bounceInUp', function () {
  animate(element, 'pulse');
});

Configure "dependencies" and "scripts" in your package.json:

"dependencies": {
  "animatify": "*",
  "animate.css": "*"
},
"scripts": {
  "build:css": "cp node_modules/animate.css/animate.css public/",
  "build:js": "browserify -o public/bundle.js .",
  "build": "npm run build:css && npm run build:js"
}

API

  • animate(element, animation[, opts][, callback]): Animates an element with the named animation and invokes the callback when done.
    • element: A DOM element.
    • animation: The name of one of the Animate.css animations.
    • opts: An object with any of these properties (defaults apply as defined by animate.css):
      • delay: A delay, e.g. '1s'.
      • duration: A duration, e.g. '1.5s'.
      • iterationCount: The number of iterations.
    • callback: A function that will be invoked once the animation finished.
  • animate.disable(): Disables animations and always invokes the callback immidiately. Useful for test runs or to allow disabling animations in your app.

Testing

$ npm install
$ npm test
$ open test/test.html

License

MIT

Keywords

FAQs

Last updated on 17 Mar 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc