nitro-web 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/auth/auth.api.js +2 -2
- package/package.json +1 -1
- package/util.js +1 -1
|
@@ -233,7 +233,7 @@ export async function signinAndGetState(user, isDesktop) {
|
|
|
233
233
|
return { ...store, jwt }
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
function tokenCreate(id) {
|
|
236
|
+
export function tokenCreate(id) {
|
|
237
237
|
return new Promise((resolve) => {
|
|
238
238
|
crypto.randomBytes(16, (err, buff) => {
|
|
239
239
|
let hash = buff.toString('hex') // 32 chars
|
|
@@ -242,7 +242,7 @@ function tokenCreate(id) {
|
|
|
242
242
|
})
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
function tokenParse(token) {
|
|
245
|
+
export function tokenParse(token) {
|
|
246
246
|
let split = (token || '').split(':')
|
|
247
247
|
let hash = split[0].slice(0, 32)
|
|
248
248
|
let userId = split[0].slice(32)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
package/util.js
CHANGED
|
@@ -175,7 +175,7 @@ export function currencyToCents (currency) {
|
|
|
175
175
|
* return unexpected result (it may ignore daylight saving).
|
|
176
176
|
*/
|
|
177
177
|
export function date (date, format, timezone) {
|
|
178
|
-
if (!date
|
|
178
|
+
if (!date) return 'Date?'
|
|
179
179
|
|
|
180
180
|
// Get the milliseconds
|
|
181
181
|
let milliseconds = 0
|