Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-arithmatic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-arithmatic

Data Olympics - reversing strings and formatting dollars into strings like a champ.

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
75
decreased by-42.75%
Maintainers
1
Weekly downloads
 
Created
Source

Data Arithmatic

Basic data gymnastics. String olympics, number formatting, simple token parsing/counting -- small functions that are reused throughout various libraries. Some of these are even available in newer javascript environments.

However our code needs to run in the least capable runtime. Which is the qt browser, unfortunately.

Completely dependency free. Minified to 4kb.

Installation

npm i --save data-arithmatic

Usage

const libDataArithmatic = require('data-arithmatic');

let _DataArithmatic = new libDataArithmatic();

// The insecureStringHash function generates stable hashes based on a passed-in string
// You can define a custom prefix string, but it defaults to HSH
let tmpHash = _DataArithmatic.insecureStringHash('Dogs');

// tmpHash equals 'HSH2135767'
console.log(tmpHash);

Examples

The ./test/ folder of this repository includes so many exercises of the functions available in this library.

Keywords

FAQs

Package last updated on 08 May 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc