Add wordpress-hash-node (#42959)

This commit is contained in:
Glenn Reyes
2020-03-06 14:32:52 -08:00
committed by GitHub
parent dd3e8a2e85
commit 377936895e
4 changed files with 35 additions and 0 deletions
+7
View File
@@ -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;
+23
View File
@@ -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"
]
}
+1
View File
@@ -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);