Skip to content

Commit

Permalink
refactor: move lang to misc
Browse files Browse the repository at this point in the history
  • Loading branch information
bingtsingw committed Feb 5, 2024
1 parent 08ac433 commit 721c0a0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export * from './datetime';
export * from './exception';
export * from './format';
export * from './generator';
export * from './lang';
export * from './misc';
7 changes: 0 additions & 7 deletions src/lang/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/lang/sleep.ts

This file was deleted.

5 changes: 5 additions & 0 deletions src/misc/sleep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const sleep = (ms: number): Promise<void> => {
return new Promise((r) => {
setTimeout(r, ms);
});
};
2 changes: 1 addition & 1 deletion src/lang/stringify.spec.ts → src/misc/stringify.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, test } from 'bun:test';
import { stringify } from './stringify';

describe('lang', () => {
describe('misc', () => {
test('stringify', () => {
expect(stringify({ a: '1' })).toEqual('{"a":"1"}');
expect(stringify('{"a":"1"}')).toEqual('{"a":"1"}');
Expand Down
File renamed without changes.

0 comments on commit 721c0a0

Please sign in to comment.