function JsBarcode(element, text, options) {
var api = new API();
if (typeof element === "undefined") {
throw Error("No element to render on was provided.");
}
// Variables that will be pased through the API calls
api._renderProperties = (0, _getRenderProperties2.default)(element);
api._encodings = [];
api._options = _defaults2.default;
api._errorHandler = new _ErrorHandler2.default(api);
// If text is set, use the simple syntax (render the barcode directly)
if (typeof text !== "undefined") {
options = options || {};
if (!options.format) {
options.format = autoSelectBarcode();
}
api.options(options)[options.format](text, options).render();
}
return api;
}n/a
function JsBarcode(element, text, options) {
var api = new API();
if (typeof element === "undefined") {
throw Error("No element to render on was provided.");
}
// Variables that will be pased through the API calls
api._renderProperties = (0, _getRenderProperties2.default)(element);
api._encodings = [];
api._options = _defaults2.default;
api._errorHandler = new _ErrorHandler2.default(api);
// If text is set, use the simple syntax (render the barcode directly)
if (typeof text !== "undefined") {
options = options || {};
if (!options.format) {
options.format = autoSelectBarcode();
}
api.options(options)[options.format](text, options).render();
}
return api;
}...
#### Simple example:
````javascript
JsBarcode("#barcode", "Hi!");
// or with jQuery
$("#barcode").JsBarcode("Hi!");
````
##### Result:

#### Example with options:
...getModule = function (name) {
return _barcodes2.default[name];
}n/a
function JsBarcode(element, text, options) {
var api = new API();
if (typeof element === "undefined") {
throw Error("No element to render on was provided.");
}
// Variables that will be pased through the API calls
api._renderProperties = (0, _getRenderProperties2.default)(element);
api._encodings = [];
api._options = _defaults2.default;
api._errorHandler = new _ErrorHandler2.default(api);
// If text is set, use the simple syntax (render the barcode directly)
if (typeof text !== "undefined") {
options = options || {};
if (!options.format) {
options.format = autoSelectBarcode();
}
api.options(options)[options.format](text, options).render();
}
return api;
}...
#### Simple example:
````javascript
JsBarcode("#barcode", "Hi!");
// or with jQuery
$("#barcode").JsBarcode("Hi!");
````
##### Result:

#### Example with options:
...getModule = function (name) {
return _barcodes2.default[name];
}n/a
minifiedFilename = function (name){
return "JsBarcode." + name + ".min.js";
}...
function webpackMin(name, dest){
dest = dest || './';
return gulp.src('bin/JsBarcode.js')
.pipe(gulpWebpack(
{
output: {
filename: shared.minifiedFilename(name)
},
plugins: [new webpack.optimize.UglifyJsPlugin()]
}
, webpack))
.pipe(header(settings.banner, require(settings.baseDir + 'package.json') ))
.pipe(gulp.dest("dist/" + dest));
}
...