djb2a
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,6 +0,23 @@ | ||
/** | ||
[DJB2a](http://www.cse.yorku.ca/~oz/hash.html#djb2) non-cryptographic hash function. | ||
declare const djb2a: { | ||
/** | ||
[DJB2a](http://www.cse.yorku.ca/~oz/hash.html#djb2) non-cryptographic hash function. | ||
@returns The hash as a positive integer. | ||
*/ | ||
export default function djb2a(string: string): number; | ||
@returns The hash as a positive integer. | ||
@example | ||
``` | ||
import djb2a = require('djb2a'); | ||
djb2a('🦄🌈'); | ||
//=> 1484783307 | ||
``` | ||
*/ | ||
(string: string): number; | ||
// TODO: remove this in the next major version, refactor the whole definition to: | ||
// declare function djb2a(string: string): number; | ||
// export = djb2a; | ||
default: typeof djb2a; | ||
}; | ||
export = djb2a; |
@@ -19,2 +19,3 @@ 'use strict'; | ||
module.exports = djb2a; | ||
// TODO: remove this in the next major version | ||
module.exports.default = djb2a; |
{ | ||
"name": "djb2a", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "DJB2a non-cryptographic hash function", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -35,6 +35,6 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"tsd-check": "^0.5.0", | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.1", | ||
"xo": "^0.24.0" | ||
} | ||
} |
3510
33