{"_id":"@ascensionlabs/sdejs","name":"@ascensionlabs/sdejs","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ascensionlabs/sdejs","version":"1.0.0","description":"Tools for retrieving data from Eve Online Static Data Export (SDE)","license":"AGPL-3.0-or-later","author":{"name":"Ascension Labs"},"type":"module","main":"index.js","dependencies":{"unzipper":"^0.12.3"},"gitHead":"0a28390827597bf44bb36c17d74ffce24ec1ad38","_id":"@ascensionlabs/sdejs@1.0.0","_nodeVersion":"22.16.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-OeOlH7jFyKuNH9D40YT7Oz+yEnfEvT+VTyRxM1bzqRDnW3+PY5OvzyFXB0ovo7YfDfva5h4+Vrr19LiPFXeXkA==","shasum":"70b5392a20fe2f0d53500cb9914baace09a01034","tarball":"https://registry.npmjs.org/@ascensionlabs/sdejs/-/sdejs-1.0.0.tgz","fileCount":6,"unpackedSize":6720,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBhqLDJskg/8+m8EvL0JIE88OZkHM201+49zT6T3CprzAiEAo9cN76Y1OXTgIuDTUSnuWd3JwcJ1n2CAmog49mXVXYY="}]},"_npmUser":{"name":"ascensionlabs","email":"holydaimon@proton.me"},"directories":{},"maintainers":[{"name":"ascensionlabs","email":"holydaimon@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdejs_1.0.0_1780404580579_0.301457518260992"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-02T12:49:40.343Z","1.0.0":"2026-06-02T12:49:40.718Z","modified":"2026-06-02T12:49:41.584Z"},"maintainers":[{"name":"ascensionlabs","email":"holydaimon@proton.me"}],"description":"Tools for retrieving data from Eve Online Static Data Export (SDE)","author":{"name":"Ascension Labs"},"license":"AGPL-3.0-or-later","readme":"# SDEJS\r\n\r\nTools for retrieving data from Eve Online Static Data Export (SDE).\r\n\r\n### Installation\r\n\r\n`npm install @ascensionlabs/sdejs`\r\n\r\n### API\r\n\r\nThe sdejs api treats the SDE's jsonl files as arrays and takes the form of\r\n\r\n`sdejs.<sdeFileName>.find(predicateFn = it => it, singleRecord = false): Array<Object>|Object`\r\n\r\nfind works similar to the Array.find; if the predicateFn returns true then that record is returned. By default predicateFn is an identity funciton so you can pass nothing to get all records. The second parameter causes the find to stop at the first record found and return its object directly. Every function in sdejs returns a Promise so ensure you are using await or then/catch when calling them.\r\n\r\n### Example Usage\r\n\r\n```\r\nimport { sdejs } from '@ascensionlabs/sdejs'\r\n\r\nconst sde = await sdejs()\r\n\r\n// get the forge object\r\nconst theForgeRegion = await sde.mapRegions.find(region => region.name.en === 'The Forge', true)\r\n\r\n// get all systems in the forge region\r\nconst systemsInTheForge = await sde.mapSolarSystems.find(sys => sys.regionID === theForgeRegion._key)\r\n\r\nconsole.log({ systemsInTheForge })\r\n```\r\n\r\n```\r\nconst rifterType = await sde.types.find(type => type.name.en === 'Rifter')\r\n\r\n// grab all dogma attributes for the rifter\r\nconst rifterTypeAttributes = await sde.dogmaAttributes.find(sys => sys.typeID === rifterType._key)\r\n\r\n// map out only what we need and rename the _key to attributeID\r\nconst rifterInfo = rifterTypeAttributes.map(({\r\n    _key: attributeID,\r\n    name,\r\n    description,\r\n    defaultValue\r\n}) =>  ({ attributeID, name, description, defaultValue }))\r\n\r\nconsole.log({ rifterInfo })\r\n```\r\n\r\n### Update & Download Latest SDE\r\n\r\nsdejs also provides functions for keeping the SDE up to date on your machine.\r\n\r\n```\r\nimport { checkSDE, updateSDE } from '@ascensionlabs/sdejs'\r\n\r\nconst isNewVersionAvailable = await checkSDE() // using default path './sde/'\r\n\r\nif (isNewVersionAvailable) {\r\n    // updateSDE downloads the latest SDE and unzips it to location provided or default './sde/'\r\n    const success = await updateSDE()\r\n}\r\n```\r\n\r\nupdateSDE will overwrite the contents of the current SDE with the new files.","readmeFilename":"README.md","_rev":"1-e2c738099473a0f5f17d0572de9e4258"}