thena

A simple, lightweight, and fast utility library for Node and the browser.
1,007 1
Install
npm install thena
Latest Version:0.0.10
Vue:3
License:MIT
Last Updated:Mar 30, 2023
Links: GitHub  ·  npm
Maintainer: thecommieaxolotl

thena

Open Bundle Open Site

A simple, lightweight, and fast utility library for Node and the browser.

import thena from 'thena'; // includes only browser-safe functions
import node from 'thena/node'; // includes both browser-safe and node-only functions

// replace
for (let i = 0; i < 10; i++) {
  console.log(i);
}

const pkj = JSON.parse(fs.readFileSync('package.json', 'utf8'));

pkj.dependencies.thena = '^1.0.0';

fs.writeFileSync('package.json', JSON.stringify(pkj, null, 2));

// with
th.loop(10, () => {
    console.log(i);
})

const pkj = thena.stream('package.json')

pkj.dependencies.thena = '^1.0.0';

Utilities

thena

  • each - Iterates over an array or object and calls a function for each item.
  • loop - Loops a function a specified number of times.
  • num - Converts strings, arrays, and objects to numbers.
  • fetch - Fetches a URL and returns a re-consumable response.

thena/node

everything from thena

  • json - Reads and parses a JSON file.
  • set - Sets a value in a JSON file.
  • stream - Read a JSON file and return a proxy that can be used to read and write to the file.
  • log - Effortlessly colour and style your console logs.

Related Packages

@cherrypulp/i18n

Simple I18n wrapper around a global object

2,485
sgs-node

sgs node

9,429
@mudas/util

A tools library of null、boolean、number、string、datetime、object、array、funct...

1,599 0
hast-util-to-jsx-runtime

hast utility to transform to preact, react, solid, svelte, vue, etc

1,036,395,716 90

Version History

Version Released Vue License
0.0.10 ^3.2.47 MIT
0.0.9 ^3.2.47 MIT
0.0.8 ^3.2.47 MIT
0.0.7 ^3.2.47 MIT
0.0.6 ^3.2.47 MIT