@requestnetwork/multi-format
Advanced tools
Comparing version 0.15.5 to 0.15.6-next.1403
@@ -25,3 +25,3 @@ "use strict"; | ||
// check if one of the format of the group can handle the data | ||
return this.availableFormats.some(format => format.isSerializableObject(data)); | ||
return this.availableFormats.some((format) => format.isSerializableObject(data)); | ||
} | ||
@@ -36,3 +36,3 @@ /** | ||
// check if one of the format of the group can handle the string | ||
return this.availableFormats.some(format => format.isDeserializableString(formatted)); | ||
return this.availableFormats.some((format) => format.isDeserializableString(formatted)); | ||
} | ||
@@ -47,3 +47,3 @@ /** | ||
// Find the format that can handle the data | ||
const matchingFormat = this.availableFormats.find(format => format.isSerializableObject(data)); | ||
const matchingFormat = this.availableFormats.find((format) => format.isSerializableObject(data)); | ||
// if found, serialize with the right format | ||
@@ -63,3 +63,3 @@ if (matchingFormat) { | ||
// Find the format that can handle the string | ||
const matchingFormat = this.availableFormats.find(format => format.isDeserializableString(formatted)); | ||
const matchingFormat = this.availableFormats.find((format) => format.isDeserializableString(formatted)); | ||
// if found, deserialize with the right format | ||
@@ -66,0 +66,0 @@ if (matchingFormat) { |
@@ -30,3 +30,3 @@ "use strict"; | ||
function deserialize(formatted) { | ||
const matchingFormat = availableFormats.find(format => format.isDeserializableString(formatted)); | ||
const matchingFormat = availableFormats.find((format) => format.isDeserializableString(formatted)); | ||
if (matchingFormat) { | ||
@@ -44,3 +44,3 @@ return matchingFormat.deserialize(formatted); | ||
function serialize(data) { | ||
const matchingFormat = availableFormats.find(format => format.isSerializableObject(data)); | ||
const matchingFormat = availableFormats.find((format) => format.isSerializableObject(data)); | ||
if (matchingFormat) { | ||
@@ -47,0 +47,0 @@ return matchingFormat.serialize(data); |
{ | ||
"name": "@requestnetwork/multi-format", | ||
"version": "0.15.5", | ||
"version": "0.15.6-next.1403+c3d74ee0", | ||
"publishConfig": { | ||
@@ -36,4 +36,3 @@ "access": "public" | ||
"clean": "shx rm -rf dist tsconfig.tsbuildinfo", | ||
"lint": "tslint --project . && eslint \"src/**/*.ts\"", | ||
"lint-staged": "lint-staged", | ||
"lint": "eslint \"src/**/*.ts\"", | ||
"prepare": "yarn run build", | ||
@@ -44,12 +43,7 @@ "test": "jest", | ||
"dependencies": { | ||
"@requestnetwork/types": "0.31.0" | ||
"@requestnetwork/types": "0.31.1-next.1403+c3d74ee0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "26.0.13", | ||
"@typescript-eslint/parser": "4.1.1", | ||
"eslint": "7.9.0", | ||
"eslint-plugin-spellcheck": "0.0.17", | ||
"eslint-plugin-typescript": "0.14.0", | ||
"jest": "26.4.2", | ||
"lint-staged": "10.3.0", | ||
"nyc": "15.1.0", | ||
@@ -61,6 +55,5 @@ "prettier": "2.2.1", | ||
"ts-node": "9.0.0", | ||
"tslint": "6.1.3", | ||
"typescript": "4.1.3" | ||
}, | ||
"gitHead": "07a78b313ce4dc8aefd7c44829b31e275a42a2eb" | ||
"gitHead": "c3d74ee025ab662fbd022f421106a3759d47a23b" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9
55312
- Removed@requestnetwork/types@0.31.0(transitive)
- Removedbn.js@5.1.3(transitive)
- Removedevents@3.2.0(transitive)