Licence
Apache-2.0
Version
0.1.0
Deps
0
Size
9 kB
Vulns
0
Weekly
0
Datatops.js
Usage
Include the datatops.js file in your HTML page by downloading it and linking
to it in a <script> tag:
<script src="datatops.js"></script>
Alternatively, you can use this CDN link:
<script src="https://cdn.jsdelivr.net/gh/datatops/datatops.js@v0.1.0/datatops.js"></script>
Then, use the Datatops object to access the library. Put this code somewhere in a <script> tag in your project:
const datatops = new Datatops({
server: "https://my-datatops-website.com",
project: "my-datatops-survey",
userToken: "1mg9dj4b",
});
Then you can use this code later on to save data:
datatops.store({
favoriteNumber: 42,
favoriteColor: "blue",
dateOfSurveySubmission: new Date(),
});
Building
rollup index.js --file bundle.js --format umd --name "Datatops"