Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
A convenient way to interact with the Elarian APIs.
You can install the package from npm by running:
$ npm install elarian
// on node
const { Elarian } = require('elarian');
/*
or in the browser
<script src="dist/elarian.min.js"></script>
const { Elarian } = ElarianSDK;
*/
// ...
const client = new Elarian({
apiKey: 'YOUR_API_KEY', // or authToken: 'YOUR_AUTH_TOKEN'
orgId: 'YOUR_ORG_ID',
appId: 'YOUR_APP_ID',
});
client.on('ussdSession', async ({ data, customer}, callback) => {
const {
input,
sessionId,
} = data;
const appData = await customer.leaseAppData();
let {
name,
state = 'newbie',
} = appData;
const menu = {
text: null,
isTerminal: true,
};
switch (state) {
case 'veteran':
if (name) {
menu.text = `Welcome back ${name}! What is your new name?`;
menu.isTerminal = false;
} else {
name = input.value;
menu.text = `Thank you for trying Elarian, ${name}!`;
menu.isTerminal = true;
await customer.sendMessage(
{ number: 'Elarian', provider: 'telco' },
{ text: `Hey ${name}! Thank you for trying out Elarian` },
);
}
break;
case 'newbie':
default:
menu.text = 'Hey there, welcome to Elarian! What\'s your name?';
menu.isTerminal = false;
state = 'veteran';
break;
}
await customer.updateAppData({ state, name });
callback(null, menu);
});
client
.connect()
.then(() => console.log('App is running!'))
.catch(console.error);
Take a look at the API docs here. For detailed info on this SDK, see the documentation.
Run all tests:
$ npm install
$ npm test
If you find a bug, please file an issue on our issue tracker on GitHub.
FAQs
Elarian JavaScript SDK
The npm package elarian receives a total of 7 weekly downloads. As such, elarian popularity was classified as not popular.
We found that elarian demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.