Skip to content

Commit 8b07afc

Browse files
authored
Merge pull request #6 from DanHulton/feature/remove_commonjs_readme_instructions
Removes CommonJS-specific README instructions.
2 parents f495453 + f7d21e8 commit 8b07afc

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

README.md

-14
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,6 @@ encodeFromUUID(<prefix>, <UUID string>)
7373
```
7474
returns e.g. `prefix_1g64w3grk1ccvjtd31csgjtdsr`
7575

76-
### CommonJS import
77-
If your code is commonJS, you can import in this manner
78-
```
79-
export const importDynamic = new Function(
80-
'modulePath',
81-
'return import(modulePath)',
82-
)
83-
84-
export async function generateNewTypeId(type: string) {
85-
const { typeid } = await importDynamic('typeid-ts')
86-
return typeid(type)
87-
}
88-
```
89-
9076
## Related Work
9177
+ [UUIDv7](https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-uuid-version-7) - The upcoming UUID standard that TypeIDs are based on.
9278
+ [typeid-go](https://github.com/jetpack-io/typeid-go) - Ported from this library

0 commit comments

Comments
 (0)