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

@gi.ts/parser

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gi.ts/parser - npm Package Compare versions

Comparing version 1.2.0 to 1.4.0

2

dist/parser.d.ts
import { GirXML } from "./xml";
export declare function parseGir(contents: string): Promise<GirXML>;
export declare function parseGir(contents: string): GirXML;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseGir = void 0;
const xml2js_1 = require("xml2js");
const util_1 = require("util");
// Promisify xml2js' parseString
const parseStringAsync = async (str) => await util_1.promisify(xml2js_1.parseString)(str);
async function parseGir(contents) {
return await parseStringAsync(contents);
const fast_xml_parser_1 = require("fast-xml-parser");
function parseGir(contents) {
return fast_xml_parser_1.parse(contents, {
attributeNamePrefix: "",
attrNodeName: "$",
ignoreAttributes: false,
ignoreNameSpace: false,
allowBooleanAttributes: true,
parseNodeValue: true,
parseAttributeValue: false,
trimValues: true,
arrayMode: true
});
}
exports.parseGir = parseGir;

@@ -14,3 +14,3 @@ declare type Version = string;

export interface GirXML {
repository: Repository;
repository: Repository[];
}

@@ -17,0 +17,0 @@ export interface SourcePositionElement extends Element<SourcePosition> {

{
"name": "@gi.ts/parser",
"version": "1.2.0",
"version": "1.4.0",
"main": "dist/lib.js",

@@ -23,9 +23,9 @@ "types": "dist/lib.d.ts",

"dependencies": {
"xml2js": "^0.4.22"
"fast-xml-parser": "^3.17.5"
},
"devDependencies": {
"@types/xml2js": "^0.4.4",
"typescript": "^4.1.0-dev.20201005"
"typescript": "^4.1.0"
},
"gitHead": "119aca66a2eea4511f0f2ccf05430343090bbc95"
"gitHead": "a94a1cd0c94d8c42b284a57fe2a6c712dd2caace"
}
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