
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
Welcome to the loka.js api!
by itsredstonepro#0979
Installation requires nodejs >= 1.12
npm i loka.js axios
more docs coming soon
const events = require("loka.js").events
events.registerEvent(String eventType, Function callback)
returns > Event object
events.disconnectLisener(String id)
returns {error:Boolean}
events.fireEvents(String eventType, Any args)
returns void
Event object
{
id:String,
error:Boolean
}
test (for testing)
onbattle (fires when new battle appendes)
ontownappend (fires when new town appendes)
ontownremove (fires when town is destoyed/fallen)
onallianceappend (fires when new alliance appendes)
onallianceremove (fires when alliance is destroyed/fallen)
Event logs can be preserved between multiple runs/program starts. The settings are located in the top section of the loka.js's index.js.
You can generate new logs by running: node node_modules/loka.js --noRun --loadNewLogs , this will generate up-to-date logs into the saves.
If preservedLogs equals true then the latest data will be get from the save files on program startup, this can be handy if your program crashes a lot.
If preservedLogs equals false then there are 2 options, useNewAsLatest can be true or false, if true then an empty table will be used as the latest and all events will rapidly fire (because it things there are lots of changes). Or useNewAsLatest can be false, then the current "situation" will be used as the latest.
You can also change the log save locations as you like by adjusting the filePath parameter.
FAQs
A loka api wrapper for nodejs and ts!
The npm package loka.js receives a total of 20 weekly downloads. As such, loka.js popularity was classified as not popular.
We found that loka.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.