@esentri/transformer-functions
transformer functions from one data type into another
Last updated 10 months ago by maurice-mueller .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @esentri/transformer-functions 
SYNC missed versions from official npm registry.

Transformer Functions

Build Status Coverage Status npm version

Simple functions for transforming from one data type into another.

Install

npm install @esentri/transformer-functions
yarn add @esentri/transformer-functions

Usage

Choose the needed function from the table (left = from, top = to):

From \ To String HexString ArrayBuffer Uint8Array Base64 ArrayObject
String - X X X X -
HexString X - X X X -
ArrayBuffer X X - X X X
Uint8Array X X X - X X
Base64 X X X X - -
ArrayObject - - X X - -

The corresponding method will be called:

[Type]To[Type] e.g.: StringToArrayBuffer [Type]WithBinaryDataTo[Type]: if you need to transform binary data

NOTE: String, HexString, and Base64 are all of type string. They differ in the way what they represent (and therefor in the way they are handled).

Special Types

HexString: A string that contains only hex values (e.g. 68656c6c6f20776f726c64). ArrayObject: An object that can be transformed to an array (e.g. {0: 10, 1: 298, 2: 233})

Projects used

<summary>Typescript Library Starter dependencies</summary>

License

MIT License

Copyright (c) 2018 esentri AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Current Tags

  • 0.6.0                                ...           latest (10 months ago)

11 Versions

  • 0.6.0                                ...           10 months ago
  • 0.5.0                                ...           10 months ago
  • 0.4.0                                ...           10 months ago
  • 0.3.5                                ...           10 months ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 11
Dependencies (2)
Dev Dependencies (30)

Copyright 2014 - 2016 © taobao.org |