Socket
Socket
Sign inDemoInstall

@lapo/asn1js

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lapo/asn1js - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

asn1.js

@@ -41,3 +41,3 @@ // ASN.1 JavaScript decoder

['AEIUaeiu', 'ĄĘĮŲąęįų'], // Ogonek
['CDELNRSTZcdelnrstz', 'ČĎĚĽŇŘŠŤŽčďěľňřšťž'] // Caron
['CDELNRSTZcdelnrstz', 'ČĎĚĽŇŘŠŤŽčďěľňřšťž'], // Caron
];

@@ -44,0 +44,0 @@

{
"name": "@lapo/asn1js",
"version": "2.0.0",
"version": "2.0.1",
"description": "Generic ASN.1 parser/decoder that can decode any valid ASN.1 DER or BER structures.",

@@ -50,6 +50,11 @@ "type": "module",

"no-var": [ "warn" ],
"comma-dangle": [ "error", "never" ]
"comma-dangle": [ "error", "always-multiline" ]
},
"overrides": [
{
"files": [ "defs.js" ],
"parserOptions": {
"ecmaVersion": 2020
}
}, {
"files": [ "test.js", "parseRFC.js", "dumpASN1.js" ],

@@ -60,4 +65,3 @@ "parserOptions": {

"rules": {
"strict": [ "error", "global" ],
"comma-dangle": [ "error", "always-multiline" ]
"strict": [ "error", "global" ]
}

@@ -71,5 +75,6 @@ }, {

}, {
"files": [ "tags.js" ],
"files": [ "tags.js", "rfcdef.js" ],
"rules": {
"comma-dangle": [ "error", "always-multiline" ],
"indent": [ "error", 2, { "ignoredNodes": [ "Program > ExpressionStatement > CallExpression > FunctionExpression > BlockStatement > ExpressionStatement[directive='use strict']:first-child" ] } ],
"comma-dangle": "off",
"quotes": [ "warn", "double" ]

@@ -76,0 +81,0 @@ }

@@ -15,3 +15,4 @@ asn1js

npm install @lapo/asn1js
# or with yarn
# or other tools
pnpm install @lapo/asn1js
yarn add @lapo/asn1js

@@ -23,4 +24,2 @@ ```

```js
const ASN1 = require('@lapo/asn1js');
// or with ES modules
import ASN1 from '@lapo/asn1js';

@@ -32,21 +31,18 @@ ```

```js
const Hex = require('@lapo/asn1js/hex');
// or with ES modules
import Hex from '@lapo/asn1js/hex';
```
Usage with RequireJS
Unfortunately until [`require(esm)` gets released](https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/) it is necessary to use async `import()` when used from CommonJS (legacy NodeJS) code.
Usage on the web
--------------------
Can be [tested on JSFiddle](https://jsfiddle.net/lapo/tmdq35ug/).
Can be [tested on JSFiddle](https://jsfiddle.net/lapo/y6t2wo7q/).
```html
<script type="text/javascript" src="https://unpkg.com/requirejs/require.js"></script>
<script>
require([
'https://unpkg.com/@lapo/asn1js/asn1.js',
'https://unpkg.com/@lapo/asn1js/hex.js'
], function(ASN1, Hex) {
document.body.innerText = ASN1.decode(Hex.decode('06032B6570')).content();
});
import { ASN1} from 'https://unpkg.com/@lapo/asn1js@2.0.0/asn1.js';
import { Hex } from 'https://unpkg.com/@lapo/asn1js@2.0.0/hex.js';
document.body.innerText = ASN1.decode(Hex.decode('06032B6570')).content();
</script>

@@ -53,0 +49,0 @@ ```

Sorry, the diff of this file is too big to display

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