Socket
Book a DemoInstallSign in
Socket

ak-tools

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-tools

AK's collections of useful things... a comprehensive utility toolbelt for JavaScript/TypeScript projects

1.1.12
latest
Source
npmnpm
Version published
Weekly downloads
1.2K
-10.8%
Maintainers
1
Weekly downloads
 
Created
Source

ak-tools

AK's (nearly typesafe) collections of useful things...cobbled together from various projects over the years...

install:

$ npm i ak-tools

use:

const utils = require('ak-tools') 	//cjs
import {* as utils} from 'ak-tools' 	//esm

verify

$ npm run test

if using an IDE with jsdoc support you should have a good experience.

demo

/**
 * make a folder, and a file
 * measure it... remove it
 * time the whole thing
**/
const u = require('ak-tools');
const timer = u.time('myProcess')
timer.start()

const newFolder = u.mkdir('./tmp')
const myData = [{foo: "bar"}, {baz: "qux"}]
const file = await u.touch('./tmp/data.json', u.dupeVals(myData, 1000), true);
const contents = await u.load(file)

const size = u.calcSize(u.json(contents))
const del = u.rm('./tmp/data.json')
timer.end(false)

const diag = { size: u.bytesHuman(size),...timer.report(false) }
u.log(diag)

API

See JSDoc comments in index.js for detailed API documentation.

This module exports various utility functions organized into namespaces:

  • files - File management utilities
  • validate - Data validation utilities
  • display - Formatting and display utilities
  • maths - Mathematical and crypto utilities
  • objects - Object manipulation utilities
  • arrays - Array processing utilities
  • functions - Function utilities
  • logging - Logging and diagnostic utilities

All functions are well-documented with JSDoc comments in the source code.

Keywords

utilities

FAQs

Package last updated on 09 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.