Giter VIP home page Giter VIP logo

typeid-ts's People

Contributors

danhulton avatar liamdon avatar ongteckwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

typeid-ts's Issues

Unable to build project using this package in TypeScript strict mode

  1. Have strict=true in tsconfig
  2. Build project
  3. Receive error:
    ./node_modules/typeid-ts/src/lib/basics.ts:6:5
    Type error: Variable 'uuidv7' implicitly has type 'any' in some locations where its type cannot be determined.
    
      4 | import { encode } from '../base32.js'
      5 |
    > 6 | let uuidv7
        |     ^
      7 | (async () => {
      8 |   const mod = await import('uuidv7')
      9 |   uuidv7 = mod.uuidv7
    error Command failed with exit code 1.
    

On v0.3.1, seems related to #7

Very Quick Calls Generate the Same ID

Hi! Not sure if you are using Github issues for this, but I was trying out the project and found that calling generateNew("prefix") quickly generates the same ID, and I was wondering if this was intentional? I can get around it by using encodeFromUUID and generating a UUID, but it looks like I lose the locality.

// Example code
  new Array(30).fill(0).map((_, i) => {
    console.log(generateNew("knot"));
  });
Example Output:
knot_1g64w3jc9g6gs2tchncdjjtdsk
knot_1g64w3jc9g6gs2tchncdjjtdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncdk2tdsk
knot_1g64w3jc9g6gs2tchncgr2tdsq
knot_1g64w3jc9g6gs2tchncgr2tdsq
knot_1g64w3jc9g6gs2tchncgr2tdsq
knot_1g64w3jc9g6gs2tchncgr2tdsq
knot_1g64w3jc9g6gs2tchncgrjtdv3
knot_1g64w3jc9g6gs2tchncgrjtdv3
knot_1g64w3jc9g6gs2tchncgrjtdv3
knot_1g64w3jc9g6gs2tchncgrjtdv3
knot_1g64w3jc9g6gs2tchncgrjtdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3
knot_1g64w3jc9g6gs2tchncgs2tdv3

0.3.0 release does not have new import method

I think the 0.3.0 version on npm did not have build run successfully on it before being published - it's missing the new await-free import method from #7.

If you update a project's dependency to 0.3.0 of this library and install it, then cat node_modules/typeid-ts/build/cjs/src/lib/basics.js, the old const uuidv7_1 = require("uuidv7"); require method is still there.

Node version requirements too strict?

It looks like the node version requirements for this package are restricted to just the latest LTS:

"node": ">= 18.12 <19"

Is there some reason for this restriction, i.e. does it not work under older or newer versions of Node? Sure, folks should generally want to be on the latest-available LTS, but actually making that decision should be done by the implementer of the requesting package, unless there's reason why this package wouldn't work under any other node range requirement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.