New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@internetarchive/field-parsers

Package Overview
Dependencies
Maintainers
18
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@internetarchive/field-parsers - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3-alpha1

2

dist/src/field-types/list.js
export class ListParser {
constructor(parser, options) {
this.separators = [',', ';'];
this.separators = [';', ','];
this.parser = parser;

@@ -5,0 +5,0 @@ if (options && options.separators) {

import { FieldParserInterface, FieldParserRawValue } from '../field-parser-interface';
export declare type MediaType = 'account' | 'audio' | 'collection' | 'data' | 'etree' | 'image' | 'movies' | 'software' | 'texts' | 'web';
export declare type MediaType = 'account' | 'audio' | 'collection' | 'data' | 'etree' | 'image' | 'movies' | 'search' | 'software' | 'texts' | 'web';
export declare class MediaTypeParser implements FieldParserInterface<MediaType> {

@@ -4,0 +4,0 @@ static shared: MediaTypeParser;

@@ -67,3 +67,9 @@ import { expect } from '@open-wc/testing';

});
it('defaults to semicolons before commas since commas are common in some terms', async () => {
const stringParser = new StringParser();
const parser = new ListParser(stringParser);
const response = parser.parseValue('10,000 Maniacs; Boop, Beep, Boop');
expect(response).to.deep.equal(['10,000 Maniacs', 'Boop, Beep, Boop']);
});
});
//# sourceMappingURL=list.test.js.map
{
"version": "0.1.2",
"version": "0.1.3-alpha1",
"name": "@internetarchive/field-parsers",

@@ -4,0 +4,0 @@ "description": "Field parsers for Internet Archive metadata fields.",

@@ -9,3 +9,3 @@ import {

private separators = [',', ';'];
private separators = [';', ','];

@@ -12,0 +12,0 @@ constructor(

@@ -14,2 +14,3 @@ import {

| 'movies'
| 'search'
| 'software'

@@ -16,0 +17,0 @@ | 'texts'

@@ -77,2 +77,9 @@ import { expect } from '@open-wc/testing';

});
it('defaults to semicolons before commas since commas are common in some terms', async () => {
const stringParser = new StringParser();
const parser = new ListParser(stringParser);
const response = parser.parseValue('10,000 Maniacs; Boop, Beep, Boop');
expect(response).to.deep.equal(['10,000 Maniacs', 'Boop, Beep, Boop']);
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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