Socket
Book a DemoInstallSign in
Socket

@ipld/car

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ipld/car - npm Package Compare versions

Comparing version

to
1.0.4

examples/dump-car.js

10

package.json
{
"name": "@ipld/car",
"version": "1.0.3",
"version": "1.0.4",
"description": "Content Addressable aRchive format reader and writer",

@@ -13,3 +13,3 @@ "main": "./cjs/car.js",

"build:js": "ipjs build --tests --main && npm run build:copy",
"build:copy": "cp -a tsconfig.json *.js *.ts lib/ test/ dist/",
"build:copy": "mkdir -p dist/examples/ && cp -a tsconfig.json *.js *.ts lib/ test/ dist/ && cp examples/*.* dist/examples/",
"build:types": "npm run build:copy && cd dist && tsc --build",

@@ -22,3 +22,3 @@ "prepublishOnly": "npm run build",

"test:cjs:browser": "polendina --cleanup dist/cjs/browser-test/test-*.js",
"test": "npm run lint && npm run test:node && npm run test:cjs",
"test": "npm run lint && npm run test:node && npm run test:cjs && npm run test --prefix examples/",
"coverage": "c8 --reporter=html --reporter=text mocha test/test-*.js && npx st -d coverage -p 8888",

@@ -47,3 +47,3 @@ "docs": "jsdoc4readme --readme --description-only lib/reader*.js lib/indexed-reader.js lib/iterator.js lib/indexer.js lib/writer.js"

"@types/mocha": "^8.2.2",
"@types/node": "^14.14.41",
"@types/node": "^15.0.2",
"@typescript-eslint/eslint-plugin": "^4.22.0",

@@ -65,3 +65,3 @@ "@typescript-eslint/parser": "^4.22.0",

"@types/varint": "^6.0.0",
"multiformats": "^7.0.0",
"multiformats": "^8.0.3",
"varint": "^6.0.0"

@@ -68,0 +68,0 @@ },

@@ -28,4 +28,4 @@ # @ipld/car

import { CarReader, CarWriter } from '@ipld/car'
import raw from 'multiformats/codecs/raw'
import CID from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import { CID } from 'multiformats/cid'
import { sha256 } from 'multiformats/hashes/sha2'

@@ -74,2 +74,4 @@

See the [examples](./examples) directory for more.
## Usage

@@ -81,2 +83,9 @@

Please be aware that `@ipld/car` **does not validate** that block data matches
the paired CIDs when reading a CAR. See the
[verify-car.js](./examples/verify-car.js) example for one possible approach to
validating blocks as they are read. Any CID verification requires that the hash
function that was used to generate the CID be available, the CAR format does
not restrict the allowable multihashes.
### [`CarReader`](#CarReader)

@@ -83,0 +92,0 @@

@@ -43,5 +43,5 @@ {

"cjs",
"example*.js"
"examples"
],
"compileOnSave": false
}
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.