Socket
Socket
Sign inDemoInstall

data-arithmatic

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
52
increased by48.57%
Maintainers
1
Install size
261 kB
Created
Weekly downloads
 

Readme

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

Last updated on 08 May 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc