New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

tualo-code39

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tualo-code39

Small and simple Code 3 of 9 Library

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Description

tualo-code39 is a small and simple code 3 of 9 library written in javascript. This library creates simple text representation of the barcode for the given string. The function getCode(data) returns the barcode representation as string. "n" or "N" means you have to draw a narrow bar. "w" or "W" means you have to draw a normal bar. If the letter is in upper case you must draw a black bar. You don't need to draw the lower case letters, but you have to skip narrow or wide bar size ahead. Based on the width of the normal (or wide) bar's width, the narrow bar width must be the third part of that.

If the given string contains any not supported characters, an exception will be thrown.

Requirements

  • node.js -- v0.8.0 or newer

Installation

npm install tualo-code39

How to Use

From nodejs:

var Code39 = require('tualo-code39').Code39;
var code39 = new Code39();
var ascii = code39.getCode('tualo.de');
console.log(ascii);

In a Browser:

<script src="lib/code39.js" type="text/javascript"></script>
<script type="text/javascript">
    var code39 = new Code39();
    var ascii = code39.getCode('tualo.de');
    console.log(ascii);
</script>

The output will be:

NwNnWnWnNnNnNnWnWwNnWwNnNnNnWnWnNnNwNnWnNnWnNnNwWnWnNnWnNwNnWwNnNnWnNnNnNnWwNnWnWnNnWwNnNnNwNnWnWnNn

Keywords

barcode

FAQs

Package last updated on 31 May 2013

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