Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "xksuid", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Extended K-Sortable UID for browser & NodeJS 16+", | ||
"type": "module", | ||
"main": "./src/index.js", | ||
"homepage": "https://github.com/ValeriaVG/xksuid#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:ValeriaVG/xksuid.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ValeriaVG/xksuid/issues" | ||
}, | ||
"scripts": { | ||
@@ -8,0 +16,0 @@ "test": "node tests/index.js", |
@@ -32,3 +32,40 @@ # Extended K-Sortable UID | ||
## Usage | ||
API: | ||
```js | ||
generate() // ASC KSUID | ||
generate(true) // DESC xKSUID | ||
generate(true,new Date('2022-01-01').getTime()) // DESC xKSUID with custom timestamp | ||
``` | ||
Via CDN: | ||
```html | ||
<script> | ||
import {generate} from 'https://cdn.jsdelivr.net/npm/xksuid@0.0.1/src/index.js' | ||
</script> | ||
``` | ||
Via NPM: | ||
```sh | ||
npm install xksuid | ||
``` | ||
For browser: | ||
```js | ||
import {generate} from 'xksuid' | ||
``` | ||
For NodeJS ESM: | ||
```js | ||
import {generate} from 'xksuid/src/index.node.mjs' | ||
``` | ||
For NodeJS CommonJS: | ||
```js | ||
const {generate} = await import('xksuid/src/index.node.mjs') | ||
``` | ||
## Benchmark | ||
@@ -35,0 +72,0 @@ ```sh |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
13755
0
1
81
0