Skip to content

Commit

Permalink
export utils
Browse files Browse the repository at this point in the history
  • Loading branch information
kasvith committed Feb 2, 2021
1 parent a03e6d4 commit d6a053b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './errors';
export * from './payment';
export * from './paynow';
export * from './responses';
export * from './utils';
10 changes: 8 additions & 2 deletions src/utils/hash.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import crypto from 'crypto';


export function jsonStringify (obj: unknown) {
/**
* Stringify an object with 4 spaces
*
* @export
* @param {object} obj
* @returns
*/
export function jsonStringify (obj: object) {
return JSON.stringify(obj, null, 4)
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './hash';

0 comments on commit d6a053b

Please sign in to comment.