Node JS,传统数据结构? (如Set等),任何类似Java.util的节点? [英] Node JS, traditional data structures? (such as Set, etc), anything like Java.util for node?

查看:120
本文介绍了Node JS,传统数据结构? (如Set等),任何类似Java.util的节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢节点JS,并且来自Java背景,甚至有兴趣甚至尝试一些节点似乎有点拉伸的项目,比如搜索引擎项目。

I'm loving node JS and, coming from a Java background, am interested in even trying it out for some projects where node may seem a bit of a stretch, such as a search engine project.

有一件事我有点困惑,似乎JavaScript缺乏传统的数据结构,例如一套,它具有精确的定义,甚至延伸到计算机科学以外,因为它已被用于计算机存在之前的数学(基本上是不允许重复的列表)。看起来当使用节点JS时,没有像Java.util这样的库,它具有这些基本的数据类型,我已经习惯了,我意识到我可以自己创建它,但这只是增加了更多的开销项目。

One thing I've been a bit confused by is it seems JavaScript is lacking traditional data structures, for example a set, which has a precise definition extending even beyond computer science as it has been used in mathematics before computers existed (basically a list that doesn't allow duplicates). It seems when using node JS there is no library like Java.util that has these basic data types that I have grown accustomed to, I realize I could create them myself but this just adds more overhead to the project.

是否有解决这个问题的节点(或JavaScript一般)的任何库?我认为节点有很大的潜力取代对诸如Java这样的语言的使用,因为它在开发速度方面具有如此多的优势,但是必须重新创建在更成熟的平台中被认为是理所当然的数据结构对于一个小型项目来说,可能是太多的开支。

Are there any libs for node (or JavaScript in general) that address this? I think node has a lot of potential to replace the use of a language like Java for a lot of projects as it has so many advantages in terms of development speed, but having to recreate data structures that are taken for granted in a more mature platform could be too much overhead for a small project.

如果有其他问题,我很抱歉,但是我花了一些时间搜索,没有想出很多。

I apologize if there are other questions like this, however I spent some time searching and didn't come up with much.

推荐答案

您是否查看了Underscore.js? http://underscorejs.org/

Have you looked into Underscore.js? http://underscorejs.org/

这不是一个与java.util一对一,但它提供了一堆常用的实用功能。

It's not a one to one with java.util but it provides a bunch of commonly needed utility functions.

这篇关于Node JS,传统数据结构? (如Set等),任何类似Java.util的节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆