trekhleb / javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
MIT License
185.13k stars 29.86k forks source link

How can I use this lib with npm or yarn? #560

Open ahaoboy opened 3 years ago

ahaoboy commented 3 years ago

npm link https://www.npmjs.com/package/javascript-algorithms-and-data-structures

I add this lib with yarn

yarn add javascript-algorithms-and-data-structures

But I can't use import or require this lib

o(╥﹏╥)o

ken-do commented 3 years ago

@ahaoboy What did you want to import this lib for? The documentation states clearly:

Note that this project is meant to be used for learning and researching purposes only and it is not meant to be used for production.

So I don't think there is a point in making this package importable/requirable since it's not supposed to be used as a project dependency. Just clone the repository and have some fun :)

DeeStarks commented 3 years ago

@ahaoboy What did you want to import this lib for? The documentation states clearly:

Note that this project is meant to be used for learning and researching purposes only and it is not meant to be used for production.

So I don't think there is a point in making this package importable/requirable since it's not supposed to be used as a project dependency. Just clone the repository and have some fun :)

Just exactly what I wanted to say

ZLY201 commented 1 year ago

npm 链接 https://www.npmjs.com/package/javascript-algorithms-and-data-structures

我用纱线添加这个库

yarn add javascript-algorithms-and-data-structures

但我不能使用导入或需要这个库

o(╥﹏╥)o

This library may help you. https://github.com/ZLY201/js-sdsl