Comparing version 0.1.0-alpha.1 to 0.1.0-rc.1
@@ -113,5 +113,21 @@ (function (global, factory) { | ||
Mapping["+"] = [NARROW_BAR, WIDE_SPACE, NARROW_BAR, NARROW_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR].join(""); | ||
Mapping["/"] = [NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, NARROW_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR].join(""); | ||
Mapping["$"] = [NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, NARROW_SPACE, NARROW_BAR].join(""); | ||
Mapping["%"] = [NARROW_BAR, NARROW_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR, WIDE_SPACE, NARROW_BAR].join(""); | ||
function encodeCode39(text) { | ||
return Mapping["*"] + NARROW_SPACE + text.split("").map(function (it) { | ||
return Mapping[it] + NARROW_SPACE; | ||
var fallbackChar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "-"; | ||
if (!Mapping.hasOwnProperty(fallbackChar)) { | ||
fallbackChar = "-"; | ||
} | ||
return Mapping["*"] + NARROW_SPACE + text.toUpperCase().split("").map(function (it) { | ||
return Mapping[it] ? Mapping[it] : Mapping[fallbackChar]; | ||
}).map(function (it) { | ||
return it + NARROW_SPACE; | ||
}).join("") + Mapping["*"]; | ||
@@ -118,0 +134,0 @@ } |
{ | ||
"name": "barcodejs", | ||
"version": "0.1.0-alpha.1", | ||
"version": "0.1.0-rc.1", | ||
"description": "Fast barcode generator for javascript.", | ||
@@ -11,3 +11,3 @@ "main": "dist/barcode.js", | ||
"build": "rollup -c", | ||
"format": "prettier --write --trailing-comma all --print-width 120 --use-tabs --tab-width 4 --no-semi src/*.js", | ||
"format": "prettier --write --trailing-comma all --print-width 120 --use-tabs --tab-width 4 --no-semi src/**/*.js", | ||
"prepublish": "yarn run build", | ||
@@ -14,0 +14,0 @@ "test": "yarn run flow && yarn run jest" |
# Barcode.js | ||
![Logo](assets/logo.svg) | ||
![Logo](https://cdn.rawgit.com/mormahr/barcode.js/35fd6ead/assets/logo.svg) | ||
@@ -4,0 +4,0 @@ [![Build Status](https://travis-ci.org/mormahr/barcode.js.svg?branch=master)](https://travis-ci.org/mormahr/barcode.js) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
299805
244