chordra
v1.0.3
Published
A library for the Chordra Technologies company
Downloads
3
Maintainers
Readme
chordra: a Chordra Technologies, Inc. library for Node.js
chordra
is simple to use, fast, and has been tested thoroughly on multiple machines.
Important: Note that this library will only work in a Node.js Enviroment, since with the use of mkWorkspace
in vanilla JavaScript as it does not have any privilages to work with directories. But other functions such as generateKey
would not require Node.js.
Installing
npm i chordra -g
Usage
imaplanter.generateTree
generateTree
Generates a new Tree Structure from a given path the returns it. Example:
const {implanter} = require("chordra");
implanter.generateTee("/path/to/directory");
// returns an array such as
[
{// TreeStructure
name: "Filename.ext",
index: 0,
path: "path/to/Filename.ext",
data: "Data in the file"
}, {
name: "Folder",
index: 1,
path: "path/to/Folder",
data: [] // Folders in other folders also retun a Tree
}
]
unify.generateKey
Generation of a random key from this method does not require any arguments. length
is set to 20
and isNumber
to false
by default.
const {unify} = require("chordra");
unify.generateKey()
// Returns: a%GSlpz]IateU}A!g{Hb
// When you want the key to only contain numbers
unify.generateKey(true);
// Returns: 16168949460422898591
// Changing the the length of the key
unify.generateKey(10);
unify.generateKeyFromByte
Generates a random key from a Byte. Note: The size of the byte generated must be >= 0.
const { unify } = require("chordra");
unify.generateKeyFromByte(5);
// Returns: 87c04c7905
unify.generateSeparatedKey
Generates a set of random dash separated key. keyLength
defaults to 10
.
const { unify } = require("chordra");
unify.generateSeparatedKey();
// Returns: 9348-2931-3697-9685-9692-3260-1521-6654-4032-1708