Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@modusjs/examples
Advanced tools
Under examples/
there are folders representing single example soil sample results in various forms (pdf, xml, csv, xlsx, json, etc.).
All the xml, csv, xlsx, and json examples become importable javascript ESM modules.
import xml_as_a_string from '@modusjs/examples/dist/enyart-east50-a_l_labs/hand-modus_xml.js'
import xlsx_as_base64 from '@modusjs/examples/dist/tomkat-historic/tomkat_source_data.xlsx'
import csv_as_string from '@modusjs/examples/dist/tomkat-historic/TOKA2021-22A_RMN_Ward.csv'
import json_as_typed_object from '@modusjs/examples/dist/fixing-soil-health-2022/fixing-soil-health-2022_sourcedataLab1_1.json'
import { xml, csv } from '@modusjs/convert'
console.log('json is directly usable:', json_as_typed_object);
console.log('XML can be converted to json and validated:', xml.parseAsModusResult(xml_as_a_string));
console.log('XLSX can be converted to json:', csv.parse({ base64: xlsx_as_base64, format: 'tomkat' }));
console.log('CSV can be converted to json:', csv.parse({ str: csv_as_string, format: 'tomkat' }));
Each example folder exports a index which contains an array of all the underlying filenames for this example.
The global index exports all the individual indexes as well as an all
object you can loop over to just
dynamic import all the underlying example files:
import examples from '@modusjs/examples';
for (const dir of Object.keys(examples.all)) {
for (const f of examples.all[dir]) {
const thisone = await import(`@modusjs/examples/dist/${dir}/${f}`);
}
}
yarn build
will convert every xml and json file in examples
into an importable typescript module in build/
using dev/build.js
. Then, it will compile that with typescript into javascript in dist/
and add the appropriate
typescript declaration files.
yarn test
will test that everything imports in browser and in node.
All data in this repo is released under the Creative Commons CCO 1.0 Universal Public License.
Thanks to Point Blue Conservation Science (https://pointblue.org) and TomKat Ranch (https://tomkatranch.org) for providing historic
soil sampling data in the tomkat-historic
directory.
FAQs
Directly import-able examples of soil tests, centered around Modus
We found that @modusjs/examples 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.