maintained by PandaClouds.com
PCAction is the "Action" library for the Pages SDK Clients.
-
If you want to use this library, you first need to install the Node.js.
-
When you install node.js, will also be installed npm.
-
Please run the following command.
npm install --save @panda-clouds/action
const PCAction = require('@panda-clouds/action');
// example usageYou can replace PCAction with any variable.
Unit Tests are an additional resource for learning functionality.
requires the property to be set, else throws error
Example:
Parse.Cloud.beforeSave('Book', request =>{
let button = PCAction.alertButton('ok');
return PCAction.showAlert('oops!','We couldn\'t find your account',[]); // =>
/*
{
"type": "showAlert",
"title": "oops!",
"message": "We couldn't find your account",
"buttons": [
{
"title": "ok",
"action": {
"type": "nothing"
}
}
]
}
*/
});Pull requests are welcome! here is a checklist to speed things up:
- modify
PCAction.js - add unit tests in
PCAction.spec.js - run
npm test - document method in
README.md - add your name to 'Contributors' in
README.md
(Add your name)
- [*] Marc Smith