Sha256: 443e314b6279bd193593adcb327751bceacb4c28839037585c0d135a276d3cf0
Contents?: true
Size: 720 Bytes
Versions: 5
Compression:
Stored size: 720 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
5 entries across 5 versions & 1 rubygems