DEV Community

Jahongir Sobirov
Jahongir Sobirov

Posted on

 

Data.js mini framework for beginners

Data.js

What is Data.js?

Data.js is a mini-framework that runs on Node.js. It is mainly programmed to work with arrays. This framework is able to display arrays in different formats and again give information about how much information is in the array. Its syntax is very simple.

In Data.js we create a program called "subgroup of numbers"

We can download Data.js from github. The location of the downloaded folder: (all guides)

|___bin
      |___data.js
      |___test.js
|___LICENSE
|___README.md
Enter fullscreen mode Exit fullscreen mode

We attach the data.js file in the bin folder to our program (Of course we can copy the bin folder from the uploaded folder to the folder we are creating).

const Data = require(".\bin\data.js"); //importing data.js
Enter fullscreen mode Exit fullscreen mode

Now it's your turn to create the program:

const Data = require(".\bin\data.js");
var app = new Data([25,9,16,100],{
   get: "false",
   getLenght: false,
   join: false,
   copy: false,
   constructor: false,
   entries: false,
   reverse: false,
   sort: false,
   fill: false,
   shift: false,
   map: Math.sqrt,
   pop: false
});
Enter fullscreen mode Exit fullscreen mode

Output:

[5,3,4,10] 
Enter fullscreen mode Exit fullscreen mode

Top comments (13)

Collapse
 
webreflection profile image
Andrea Giammarchi

this post doesn't clarify much about the library, its goal, what it does, plus all I could think, after reading, is: lucky you, none of your folders or files start with an n, r, t, or other special chars, where a \ would mean something else 😅

Collapse
 
jahongir2007 profile image
Jahongir Sobirov

Everyone understands this article on its own. I did not say mini-framework in vain, my friend

Collapse
 
webreflection profile image
Andrea Giammarchi

The fact somebody wrote it's not super clear what this post is about kinda contradicts your reply though, isn't it?
More specifically:

  • I don't understand what's the library about
  • I don't understand what use case it's trying to solve
  • I don't have any real-world example of how this library helps me in doing ... anything, really
  • I don't understand the lengthy list of things this library does
  • I have no idea what's inside data.js

but maybe I am just stupid 👋

Thread Thread
 
jahongir2007 profile image
Jahongir Sobirov

I'm not arguing with you

Thread Thread
 
webreflection profile image
Andrea Giammarchi

It's not about arguing mate, it's about me hinting you maybe you can improve this post, as it doesn't provide much content, hence it doesn't really help people maybe interested in this.

You can ignore my comments, but then I'd argue this looks like you are using this space to promote one of your libraries, which is OK if it helps, not so OK if it's just for SEO purposes, imho.

Thread Thread
 
jahongir2007 profile image
Jahongir Sobirov • Edited

People who want to learn this framework should read it from the flour help center :data-js.gitbook.io/data-js/

Collapse
 
eyenetting profile image
Mike

Totally agree, not quite sure what his angle is, but it's definitely not providing valuable content, or even content tbh.

Collapse
 
jahongir2007 profile image
Jahongir Sobirov

OK sir

Collapse
 
bastiw profile image
Sebastian Weiß

Why should I use it and not just the standard JavaScript ES6 methods?

Collapse
 
jahongir2007 profile image
Jahongir Sobirov

Honestly my friend I tried to create a library in javascript but could not work with the modules on my computer so I chose NodeJS

Collapse
 
exploitenomah profile image
Exploit

I think this post is really helpful as since it's my first time of coming across data.js, I can say this helped me understand when and why I might want to use it in the future.

Collapse
 
celnethub profile image
Celestine

So I took an algorithm test and if frameworks were allowed, this would have been useful.

Collapse
 
jahongir2007 profile image
Jahongir Sobirov

Ok

Why You Need to Study Javascript Fundamentals

The harsh reality for JS Developers: If you don't study the fundamentals, you'll be just another “Coder”. Top learnings on how to get to the mid/senior level faster as a JavaScript developer by Dragos Nedelcu.