Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lassy-xpath

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lassy-xpath

[![Build Status](https://github.com/UUDigitalHumanitieslab/lassy-xpath/workflows/tests/badge.svg)](https://github.com/UUDigitalHumanitieslab/lassy-xpath/actions) [![npm version](https://badge.fury.io/js/lassy-xpath.svg)](https://badge.fury.io/js/lassy-xpa

  • 0.15.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Build Status npm version

LASSY XPath

Module for working with XPath queries on LASSY XML files. It includes a graphical editor including auto completion, macros and validation based on Ace, a parser and validator based on ts-xpath and an "extractinator" for determining XPaths to get each node from the returned tree separately. It also has a "reconstructor" to create an XML structure representing the query tree. The functionality can be used as an Angular module.

Compatibility

  • v0.15.x is for Angular 15
  • v0.12.x is for Angular 12
  • v0.4.3 and down should work with Angular 6 and JQuery

Angular

npm install lassy-xpath

Import the module:

import { LassyXPathModule } from 'lassy-xpath';

@NgModule({
    imports: [LassyXPathModule]
})
export class AppModule {}

Includes the services:

import { MacroService, ExtractinatorService, ValueEvent } from 'lassy-xpath';


@Component()
export class ExampleComponent {
    constructor(
        macroService: MacroService,
        private extractinatorService: ExtractinatorService) {
        // set the macros to use in the editor
        macroService.loadDefault();
    }

    inputChanged(event: ValueEvent) {
        this.valid = !event.error;
        this.value = event.xpath;
        console.log(this.extractinatorService.extract(event.xpath));
    }
}

Embeds an editor:

<lx-editor [value]="value" (onChange)="inputChanged($event)" autofocus="true"></lx-editor>

Use the ParserService for parsing/validating a LASSY XML XPath.

Publishing a new version

Run npm run publish from root or follow these steps:

  1. Compile using npm run build
  2. cd dist/lassy-xpath
  3. Optionally run npm pack to test the package locally
  4. Remove the lassy-xpath-x.xx.x.tgz file (if generated in 3)
  5. Run npm publish

FAQs

Package last updated on 21 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc