Sha256: 0954b0ef2d55344df961e76cf0ba3eda30c2a2768ffaf54afea596fadbbd3239
Contents?: true
Size: 721 Bytes
Versions: 13
Compression:
Stored size: 721 Bytes
Contents
// takes a string and parses into an integer, but throws away commas first, to avoid truncation when there is a comma // use in place of javascript's native parseInt !function(global) { 'use strict'; var previousBlacklightRangeLimit = global.BlacklightRangeLimit; function BlacklightRangeLimit(options) { this.options = options || {}; } BlacklightRangeLimit.parseNum = function parseNum(str) { str = String(str).replace(/[^0-9-]/g, ''); return parseInt(str, 10); }; BlacklightRangeLimit.noConflict = function noConflict() { global.BlacklightRangeLimit = previousBlacklightRangeLimit; return BlacklightRangeLimit; }; global.BlacklightRangeLimit = BlacklightRangeLimit; }(this);
Version data entries
13 entries across 13 versions & 1 rubygems