2.0.2 • Published 3 months ago

stews v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Stews 🍲

Stews is a Node.JS package meant to make storing data easier by mixing parts from common data types.

  • Fully open source
  • Fully customizable w/ modding support
  • Built in random number and choice functions
  • Easy to use index & entry systems
  • Built in JSON parse & dump
  • Detailed documentation
npm i stews
npm i paishee/stews

Parts

  • Stew: built off of Sets and Maps so they DON'T allow duplicate entries
  • soup: built off of Arrays and Objects so they DO allow duplicate entries
  • Noodle: built off of Strings and includes a majority of their features
  • random: a built in random class that works with most types

Usage

const { Stew, Soup, Noodle, random } = require('stews');


let array = new Stew(["a", "b", "c"]);                 // list type
let obj = new Soup({ key1: "val1", key2: "val2" });    // pair type
let str = new Noodle("abc 123");                       // string stuff


delete array[1];


console.log(array); // Stew(2) [ 'a', 'c' ]
console.log(obj); // Soup(2) { key1: 'val1', key2: 'val2' }
console.log(str); // Noodle(7) "abc 123"


console.log(obj.length); // 2
console.log(obj.keys); // [ 'key1', 'key2' ]
console.log(obj.values); // [ 'val1', 'val2' ]


console.log(str.wordCount); // 2
console.log(str.toUpperCase(0)); // Noodle(7) "Abc 123"


console.log(random.int(1, 5)); // 4


console.log(array.random.choice()); // 'b'
console.log(obj.random.choice()); // [ 'key1', 'val1' ]
console.log(str.random.choice()); // '1'
2.0.2

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.9.29

6 months ago

1.9.28

6 months ago

1.9.27

6 months ago

1.9.26

6 months ago

1.9.25

6 months ago

1.9.24

6 months ago

1.9.23

6 months ago

1.9.22

6 months ago

1.9.21

6 months ago

1.9.20

6 months ago

1.9.19

6 months ago

1.9.18

6 months ago

1.9.17

6 months ago

1.9.16

6 months ago

1.9.15

6 months ago

1.9.14

6 months ago

1.9.13

6 months ago

1.9.12

6 months ago

1.9.11

6 months ago

1.9.10

6 months ago

1.9.9

6 months ago

1.9.8

6 months ago

1.9.7

6 months ago

1.9.6

6 months ago

1.9.5

6 months ago

1.9.4

6 months ago

1.9.3

6 months ago

1.9.2

6 months ago

1.9.1

6 months ago

1.9.0

6 months ago

1.8.3

6 months ago

1.8.2

8 months ago

1.8.1

8 months ago

1.7.2

8 months ago

1.8.0

8 months ago

1.7.1

9 months ago

1.7.0

9 months ago

1.6.6

12 months ago

1.6.5

1 year ago

1.6.4

1 year ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago