
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@j2inn/haystack-core
Advanced tools
A core haystack implementation written in TypeScript.
This library is designed to be used in conjunction with these other haystack libraries depending on your use case...
npm install @j2inn/haystack-core
The following core Haystacks are implemented...
Each haystack value has a kind that can be queried. A haystack value can be encoded to Zinc by calling toZinc().
To convert a Zinc back to a haystack value see ZincReader.
Haystack core has full support for units. The actual unit database implementation is stored in haystack-units. This enables a developer to import the whole unit database or just the units they're interested in working in.
Haystack core has comprehensive support for Haystack v4 defs. Defs add an ontology to the pre-existing haystack taxonomy that is now formalized.
The TrioReader and TrioWriter classes are used to read and write Trio files.
Hayson is an alternative JSON encoding format for Haystack that's being promoted.
Hayson has full support in Haystack Core.
An abbreviated namespace of useful methods has been created to make it easier to work with in environments such as a web browser.
A full haystack filter compiler implementation is included.
To work with filters please see HFilter.
HFilterBuilderFor the full grammar, please see the class definition for the Parser.
The main class to work with is HFilter. This class contains a number of high level methods that hide the complexity of working with the underlying parser.
When a haystack filter string is parsed, it's converted into an AST (abstract syntax tree) hierarchy of Nodes.
The Node tree can be used in the following ways...
The visitor design pattern has been implemented to make it easy to generate code for different targets (i.e. a haystack filter string).
Any errors caught during parsing are thrown as LocalizedError objects. This error object contains a lexicon key and arguments used for localization as well as a possible index number. If the index number is defined, it will specify the index number of the character that caused the error in the original haystack filter.
FAQs
Project Haystack Core
We found that @j2inn/haystack-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.