Socket
Socket
Sign inDemoInstall

hashids

Package Overview
Dependencies
0
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

CHANGELOG.md

2

lib/hashids.js

@@ -24,3 +24,3 @@ /*

this.version = "1.0.1";
this.version = "1.0.2";

@@ -27,0 +27,0 @@ /* internal settings */

@@ -5,4 +5,3 @@ {

"description": "A small Node.js class to generate YouTube-like hashids from one or many numbers. Use hashids when you do not want to expose your database ids to the user. ",
"version": "1.0.1",
"preferGlobal": true,
"version": "1.0.2",
"homepage": "http://hashids.org/node-js",

@@ -18,3 +17,3 @@ "repository": {

"license": "MIT",
"keywords": ["hashids", "hashid", "hash", "ids", "youtube", "obfuscate", "encrypt", "decrypt", "encode", "decode"],
"keywords": ["hashids", "hashid", "hash", "ids", "youtube", "bitly", "obfuscate", "encrypt", "decrypt", "encode", "decode"],
"engines": {

@@ -21,0 +20,0 @@ "node": "*"

@@ -1,9 +0,6 @@

![hashids](http://www.hashids.org.s3.amazonaws.com/public/img/hashids.png "Hashids")
======
Full Documentation
Hashids
-------
A small Node.js class to generate YouTube-like hashids from one or many numbers. Use hashids when you do not want to expose your database ids to the user. Read full documentation at: [http://hashids.org/node-js](http://hashids.org/node-js)
A small Node.js class to generate YouTube-like ids from one or many numbers. Use hashids when you do not want to expose your database ids to the user. Read **full documentation** at: [http://hashids.org/node-js](http://hashids.org/node-js)

@@ -18,3 +15,3 @@ [![hashids](https://api.travis-ci.org/ivanakimov/hashids.node.js.svg "Hashids")](https://travis-ci.org/ivanakimov/hashids.node.js)

`npm install -g hashids`
`npm install hashids`

@@ -266,85 +263,2 @@ Updating from v0.3 to 1.0?

Changelog
-------
**1.0.1**
- Auto-initialize a new instance of Hashids in case it wasn't initialized with "new" (thanks to [@rfink](https://github.com/ivanakimov/hashids.node.js/pull/15))
**1.0.0**
- Several public functions are renamed to be more appropriate:
- Function `encrypt()` changed to `encode()`
- Function `decrypt()` changed to `decode()`
- Function `encryptHex()` changed to `encodeHex()`
- Function `decryptHex()` changed to `decodeHex()`
Hashids was designed to encode integers, primary ids at most. We've had several requests to encrypt sensitive data with Hashids and this is the wrong algorithm for that. So to encourage more appropriate use, `encrypt/decrypt` is being "downgraded" to `encode/decode`.
- Version tag added: `1.0`
- `README.md` updated
**0.3.3 - Current Stable**
- `.toString()` added in `encryptHex()`: [https://github.com/ivanakimov/hashids.node.js/pull/9](https://github.com/ivanakimov/hashids.node.js/pull/9) (thanks to [@namuol](https://github.com/namuol))
**0.3.2**
- minor: contact email changed
- minor: internal version is accurate now
**0.3.1**
- minor: closure + readme update merged (thanks to [@krunkosaurus](https://github.com/krunkosaurus))
- minor: a few cleanups
**0.3.0**
**PRODUCED HASHES IN THIS VERSION ARE DIFFERENT THAN IN 0.1.4, DO NOT UPDATE IF YOU NEED THEM TO KEEP WORKING:**
- Same algorithm as [PHP version](https://github.com/ivanakimov/hashids.php) now
- Overall approximately **4x** faster
- Consistent shuffle function uses slightly modified version of [Fisher–Yates algorithm](http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm)
- Generate large hash strings faster (where _minHashLength_ is more than 1000 chars)
- When using _minHashLength_, hash character disorder has been improved
- Basic English curse words will now be avoided even with custom alphabet
- New unit tests with [Jasmine](https://github.com/mhevery/jasmine-node)
- Support for MongoDB ObjectId
- _encrypt_ function now also accepts array of integers as input
- Passing JSLint now
**0.1.4**
- Global var leak for hashSplit (thanks to [@BryanDonovan](https://github.com/BryanDonovan))
- Class capitalization (thanks to [@BryanDonovan](https://github.com/BryanDonovan))
**0.1.3**
Warning: If you are using 0.1.2 or below, updating to this version will change your hashes.
- Updated default alphabet (thanks to [@speps](https://github.com/speps))
- Constructor removes duplicate characters for default alphabet as well (thanks to [@speps](https://github.com/speps))
**0.1.2**
Warning: If you are using 0.1.1 or below, updating to this version will change your hashes.
- Minimum hash length can now be specified
- Added more randomness to hashes
- Added unit tests
- Added example files
- Changed warnings that can be thrown
- Renamed `encode/decode` to `encrypt/decrypt`
- Consistent shuffle does not depend on md5 anymore
- Speed improvements
**0.1.1**
- Speed improvements
- Bug fixes
**0.1.0**
- First commit
Contact

@@ -351,0 +265,0 @@ -------

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc