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

@ndn/naming-convention1

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndn/naming-convention1 - npm Package Compare versions

Comparing version 0.0.20220501 to 0.0.20230121

1

lib/mod_browser.js
import { Component, TT } from "@ndn/packet";
import { Encoder, NNI } from "@ndn/tlv";
class Markered {
marker;
constructor(marker) {

@@ -5,0 +6,0 @@ this.marker = Uint8Array.of(marker);

import { Component, TT } from "@ndn/packet";
import { Encoder, NNI } from "@ndn/tlv";
class Markered {
marker;
constructor(marker) {

@@ -5,0 +6,0 @@ this.marker = Uint8Array.of(marker);

11

package.json
{
"name": "@ndn/naming-convention1",
"version": "0.0.20220501",
"version": "0.0.20230121",
"description": "NDNts: Naming Convention rev1",

@@ -25,8 +25,7 @@ "keywords": [

"dependencies": {
"@ndn/packet": "0.0.20220501",
"@ndn/tlv": "0.0.20220501",
"tslib": "^2.4.0"
"@ndn/packet": "0.0.20230121",
"@ndn/tlv": "0.0.20230121",
"tslib": "^2.4.1"
},
"types": "lib/mod.d.ts",
"readme": "# @ndn/naming-convention1\n\nThis package is part of [NDNts](https://yoursunny.com/p/NDNts/), Named Data Networking libraries for the modern web.\n\nThis package implements NDN naming conventions based on marker octets.\nThis format, sometimes known as **rev1 format**, is specified in [NDN-TR-0022 revision 1](https://named-data.net/publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/), published in 2014.\nYou should not use this outdated and obsolete format in new applications, except for accessing old data.\nUse **rev3 format** from `@ndn/naming-convention2` package instead.\n\n```ts\nimport { Version, Segment } from \"@ndn/naming-convention1\";\n// We also have ByteOffset, Timestamp, and SequenceNum.\n\n// other imports for examples\nimport { Name } from \"@ndn/packet\";\nimport { strict as assert } from \"node:assert\";\n\n// Append name component with marker.\nconst name = new Name(\"/A\")\n .append(Version, 3)\n .append(Segment, 0);\nassert.equal(name.toString(), \"/8=A/8=%FD%03/8=%00%00\");\n\n// Parse name component as marker.\nassert.equal(name.at(-2).as(Version), 3);\nassert.equal(name.at(-1).as(Segment), 0);\n```\n"
"types": "lib/mod.d.ts"
}

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