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

siren-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

siren-parser - npm Package Compare versions

Comparing version 8.4.0 to 8.5.0

6

dist/Field.js

@@ -44,3 +44,3 @@ "use strict";

if (field.hasOwnProperty('value')) {
if (Object.prototype.hasOwnProperty.call(field, 'value')) {
this.value = field.value;

@@ -53,7 +53,7 @@ }

if (field.min) {
if (typeof field.min === 'number') {
this.min = field.min;
}
if (field.max) {
if (typeof field.max === 'number') {
this.max = field.max;

@@ -60,0 +60,0 @@ }

@@ -45,3 +45,3 @@ "use strict";

fields.forEach(function (field) {
if (!fields.hasOwnProperty(field.name)) {
if (!Object.prototype.hasOwnProperty.call(fields, field.name)) {
fieldsObj[field.name] = field.value;

@@ -48,0 +48,0 @@ }

@@ -12,2 +12,6 @@ "use strict";

function contains(arrayLike, stringOrRegex) {
if (!stringOrRegex) {
return false;
}
if ('string' === typeof stringOrRegex) {

@@ -31,3 +35,3 @@ return arrayLike.indexOf(stringOrRegex) > -1;

if ('string' === typeof stringOrRegex) {
return objectLike.hasOwnProperty(stringOrRegex);
return Object.prototype.hasOwnProperty.call(objectLike, stringOrRegex);
}

@@ -39,2 +43,6 @@

function getMatchingValue(objectLike, stringOrRegex) {
if (!stringOrRegex) {
return;
}
if ('string' === typeof stringOrRegex) {

@@ -41,0 +49,0 @@ return objectLike[stringOrRegex];

{
"name": "siren-parser",
"version": "8.4.0",
"description": "Pretty much the opposite of dominicbarnes/node-siren-writer",
"version": "8.5.0",
"main": "dist/index.js",

@@ -11,4 +10,3 @@ "module": "src/index.js",

"test": "npm run lint && npm run test:unit",
"test:unit": "nyc mocha",
"report-cov": "istanbul report lcovonly && coveralls < ./coverage/lcov.info"
"test:unit": "nyc mocha"
},

@@ -31,18 +29,18 @@ "files": [

"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/node": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/register": "^7.0.0",
"babel-plugin-add-module-exports": "^1.0.0",
"babel-plugin-istanbul": "^5.1.0",
"chai": "^4.2.0",
"eslint": "^5.8.0",
"eslint-config-brightspace": "^0.4.1",
"mocha": "^5.2.0",
"nock": "^10.0.2",
"@babel/cli": "^7.12.16",
"@babel/core": "^7.12.16",
"@babel/node": "^7.12.16",
"@babel/preset-env": "^7.12.16",
"@babel/register": "^7.12.13",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.3.0",
"eslint": "^7.20.0",
"eslint-config-brightspace": "^0.12.0",
"mocha": "^8.3.0",
"nock": "^13.0.7",
"nyc": "^15.1.0",
"sinon": "^7.1.1",
"sinon-chai": "^3.2.0",
"supertest": "^3.3.0"
"sinon": "^9.2.4",
"sinon-chai": "^3.5.0",
"supertest": "^6.1.3"
},

@@ -49,0 +47,0 @@ "nyc": {

@@ -350,2 +350,6 @@ # node-siren-parser

## Releasing
This repository uses the [semantic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/master/semantic-release) to create new versions. See [Triggering a Release](https://github.com/BrightspaceUI/actions/tree/master/semantic-release#triggering-a-release) for more information about automatically creating releases on merge.
## Contributing

@@ -352,0 +356,0 @@

import assert from './assert';
import {contains, getMatchingValue, getMatchingValuesByAll, hasProperty} from './util.js';
import { contains, getMatchingValue, getMatchingValuesByAll, hasProperty } from './util.js';
import Field from './Field';

@@ -4,0 +4,0 @@

import assert from './assert';
import {contains} from './util';
import { contains } from './util';

@@ -57,3 +57,3 @@ const VALID_TYPES = [

if (field.hasOwnProperty('value')) {
if (Object.prototype.hasOwnProperty.call(field, 'value')) {
this.value = field.value;

@@ -66,7 +66,7 @@ }

if (field.min) {
if (typeof field.min === 'number') {
this.min = field.min;
}
if (field.max) {
if (typeof field.max === 'number') {
this.max = field.max;

@@ -73,0 +73,0 @@ }

import Action from './Action';
import assert from './assert';
import Link from './Link';
import {contains, getMatchingValue, getMatchingValuesByAll, hasProperty} from './util.js';
import { contains, getMatchingValue, getMatchingValuesByAll, hasProperty } from './util.js';

@@ -6,0 +6,0 @@ export default function Entity(entity) {

import assert from './assert';
import {contains} from './util';
import { contains } from './util';

@@ -4,0 +4,0 @@ export default function Link(link) {

@@ -29,3 +29,3 @@ import assert from './assert';

fields.forEach(function(field) {
if (!fields.hasOwnProperty(field.name)) {
if (!Object.prototype.hasOwnProperty.call(fields, field.name)) {
fieldsObj[field.name] = field.value;

@@ -32,0 +32,0 @@ }

export function contains(arrayLike, stringOrRegex) {
if (!stringOrRegex) {
return false;
}
if ('string' === typeof stringOrRegex) {

@@ -19,3 +23,3 @@ return arrayLike.indexOf(stringOrRegex) > -1;

if ('string' === typeof stringOrRegex) {
return objectLike.hasOwnProperty(stringOrRegex);
return Object.prototype.hasOwnProperty.call(objectLike, stringOrRegex);
}

@@ -27,2 +31,6 @@

export function getMatchingValue(objectLike, stringOrRegex) {
if (!stringOrRegex) {
return;
}
if ('string' === typeof stringOrRegex) {

@@ -29,0 +37,0 @@ return objectLike[stringOrRegex];

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

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