-
Notifications
You must be signed in to change notification settings - Fork 3
Importing
Johan Fagerberg edited this page Aug 5, 2018
·
4 revisions
FlippyJS is a UMD module, which can be imported in AMD or CommonJS, or by simply including it as a <script>
.
Two things are exported:
-
flip(...)
- the main function, as described in Usage -
FLIPElement
- the internal class used to represent animated elements, as described in Advanced Usage
define(["flippy.js"], (flip)=>{
const FLIPElement = flip.FLIPElement;
});
const flip = require("flippy.js");
const FLIPElement = require("flippy.js").FLIPElement;
// flip is already defined as a global
const FLIPElement = flip.FLIPElement.
Importing • Usage • Advanced Usage • Gotchas