Socket
Socket
Sign inDemoInstall

tinyscripts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinyscripts

Tiny Useful Scripts


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

TinyScripts

A tiny set of scripts designed for quick access.


npm npm size

Install

npm i tinyscripts

Usage

base64

const { base64 } = require('tinyscripts');

var encoded = base64.encode('Hello World');
//=> SGVsbG8gV29ybGQ=
base64.decode(encoded);
//=> Hello World
base64.validate(encoded)
//=> true
  • base64.encode(str) - Encodes "str" with base64
  • base64.decode(base64) - Decodes "str" from base64
  • base64.validate(base64) - Validates "str" to see if it is valid base64

camelCase

const { camelCase } = require('tinyscripts');

camelCase('make this camel case')
//=> makeThisCamelCase
  • camelCase(str) - Turns "str" into camel case format

charMap & translate

const { charMap, translate } = require('tinyscripts');

var map = new CharMap('hwo', 'uey');
var translation = translate('Hello World', map);
//=> Uelly Eyrld
  • charMap(from, to) - Creates a new charMap that can be used with translate() (More Info)
  • translate(str, map) - Translates a string based on a charMap. This is similar to the python translate() function.

isUpperCase & isLowerCase

const { isUpperCase, isLowerCase } = require('tinyscripts');

isUpperCase('C')
//=> true
isUpperCase('c')
//=> false
isLowerCase('c')
//=> true
  • isUpperCase(str) - Returns true or false depending on if the string is uppercase.
  • isLowerCase(str) - Returns true or false depending on if the string is lowercase.

More Info

charMap

charMaps can be used with translate() to replace a charactar in a string with one of another. This is similar to the python translate() function.

Keywords

FAQs

Package last updated on 31 Mar 2021

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