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

@zxcvbn-ts/dictionary-compression

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zxcvbn-ts/dictionary-compression - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

2

dist/compress.d.ts

@@ -1,3 +0,3 @@

declare function compress(data: string[]): string;
declare function compress(data: string[]): string | string[];
export { compress as default };
{
"name": "@zxcvbn-ts/dictionary-compression",
"version": "2.0.0",
"version": "3.0.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "exports": {

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

import { compressSync, strToU8 } from 'fflate'
import { encodeBase85 } from '@alttiri/base85'
const isCompactDoubleQuotedString = (string: string) => {

@@ -38,16 +35,7 @@ // eslint-disable-next-line no-control-regex

return deltas
return deltas.join('')
}
export default function compress(data: string[]) {
const compressedWithPrefix = compressWithPrefix(data)
const compressedWithGzip = compressSync(
strToU8(compressedWithPrefix.join('')),
{
level: 9,
mem: 12,
},
)
return encodeBase85(compressedWithGzip)
return compressWithPrefix(data)
}

@@ -1,8 +0,3 @@

import { decompressSync, strFromU8 } from 'fflate'
import { decodeBase85 } from '@alttiri/base85'
export default function decompress(encodedString: string) {
const decoded = decodeBase85(encodedString)
const decompressedBuffer = decompressSync(decoded)
const decompressedArray = strFromU8(decompressedBuffer).split(/([A-Z])/g)
const decompressedArray = encodedString.split(/([A-Z])/g)
const decompressedData = []

@@ -9,0 +4,0 @@ let last = ''

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

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