Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
semantic-domains
Advanced tools
List of semantic domains from semdom.org, version 4.
npm install semantic-domains
yarn add semantic-domains
This package exports an object, which has a domains
property that is an array of semantic domain objects. Each semantic domain object has the following properties.
id: string
: The semantic domain ID. For example, the semantic domain "Injure" has ID '2.5.3'
.name: string
: Human-readable name of the semanti domain.parentId: string
: ID of the parent semantic domain. For top-level semantic domains, this string is empty.description: string
: Human-readable description of the semantic domain.examples: string[]
: Array of example words or phrases that fit the semantic domain.The array of semantic domains is sorted logically by ID.
The default export includes a few functions to search and index semantic domains.
findAllChildren(id)
: Returns an array of all children, grandchildren, etc. of a semantic domain with the given ID.
findById(id)
: Finds and returns a semantic domain by ID.
findChildren(id)
: Returns an array of immediate children of a semantic domain with the given ID.
findRoots()
: Returns an array of top-level semantic domains.
buildIndex()
: Returns an hash that includes all semantic domains, keyed by their IDs.
semantic-domains
should work on any reasonably recent version of Node.js. It uses ES2015 features like Array.find
, Array.filter
, and Array.reduce
, so you might need a polyfill if you're targeting older browsers. If you don't need the helper functions, you can include the semantic domains data directly using require('semantic-domains/domains.json')
or require('semantic-domains/domains.min.json')
.
Build the list of semantic domains directly from the source using yarn build
.
Test with yarn test
.
This NPM package, as well as the semantic domains themselves, are licensed under CC BY-SA 4.0.
The semantic domains were parsed from the list available on the RWC Questinonnaire. This document is available in the sources/ folder in DOCX format. A HTML-formatted version, which is used to parse the domains, is in the file words.html.
The semantic domain data was modified in order to be machine-readable and convenient to consume in Javascript. No major changes to the content are intended.
FAQs
List of semantic domains from semdom.org, version 4
We found that semantic-domains 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.