mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Add wordpress-hash-node (#42959)
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for wordpress-hash-node 1.0
|
||||
// Project: https://github.com/AlexAlbala/wordpress-hash-node
|
||||
// Definitions by: Glenn Reyes <https://github.com/glennreyes>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function HashPassword(password: string): string;
|
||||
export function CheckPassword(password: string, hash: string): boolean;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"wordpress-hash-node-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,4 @@
|
||||
import { HashPassword, CheckPassword } from 'wordpress-hash-node';
|
||||
|
||||
const hash: string = HashPassword('foo');
|
||||
const valid: boolean = CheckPassword('foo', hash);
|
||||
Reference in New Issue
Block a user