0.1.0 • Published 5 years ago
@panda-clouds/action v0.1.0
PCAction
maintained by PandaClouds.com
PCAction
is the "Action" library for the Pages SDK Clients.
Installation
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
Usage
Node.js
const PCAction = require('@panda-clouds/action');
// example usage
You can replace PCAction with any variable.
Methods
Unit Tests are an additional resource for learning functionality.
- mustExist()
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"
}
}
]
}
*/
});
Contributions
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
Contributors
(Add your name)
0.1.0
5 years ago