Validity style validator to ensure a property is an integer
Validity style validator to ensure a property is an integer
An arbitrary length integer library for Javascript
Create Self Signed Development Certificates
Traverse JSON Schema passing each schema object to callback
Validates if a value is an integer array.
Validates if a value is an integer.
Dead simple Object schema validation
Basic layout model and some utilities for Cytoscape.js layout extensions
Add support for more integer widths to Buffer
Pure-JS printf
A Long class for representing a 64-bit two's-complement integer value.
A Long class for representing a 64-bit two's-complement integer value.
Port of the OpenBSD bcrypt_pbkdf function to pure JS
Various helper utilities for working with buffers and binary data
Codecs for numbers of different sizes and endianness
Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
Test if a finite double-precision floating-point number is an integer.
Generate a random integer
vaadin-integer-field
Unsigned integers for Javascript
Parses and manipulates multiple comma-separated integer ranges (eg 1-3,8-10)
An implementation of the WHATWG URL Standard's URL API and parsing machinery
Maximum safe double-precision floating-point integer.
Base62 monkeypatches Integer to add an Integer#base62_encode instance method to encode an integer in the character set of 0-9 + A-Z + a-z. It also monkeypatches String to add String#base62_decode to take the string and turn it back into a valid integer.
Default validations for string and integer attributes
Integers are converted to strings using a complex mapping and a base 36 alphabet. Strings with valid digits (0-9 a-z)are converted back to integers. The encoding is one-to-one but not sequential.This is useful for obfuscating user ids in urls.
Encode and decode hexadecimal strings with 0x prefix handling, produce xxd-style hex dumps, format hex output with configurable grouping, swap endianness, extract byte ranges, pad hex strings, convert between hex and integers, and validate hex strings.
Provides a nice DSL to describe your CSV document. CSV documents can be validated against this description. You can easily define types like Integer or Array for CSV through converters.
Adds accessors to a class so that the date can be set as a string while days, months and years can be set as integers. It also allows for month as short and long text inputs, e.g. Jan, March. It will validate resulting dates and generate errors when parts are invalid and where combined parts are incorrect.
# Mod10 A simple gem to generate mod_10 check digits and check if integers are mod10 valid. ## Installation Add this line to your application's Gemfile: ```ruby gem 'mod_10' ``` And then execute: $ bundle Or install it yourself as: $ gem install mod_10 ## Usage Include the Mod10 module to make the following two methods available - generate_check_digit(value) Which returns an integer value for the mod10 check digit of a string or integer. Note: If the value is 0, then the argument was already mod10 valid. - is_mod10?(value) Returns true or false for the tested value is it is or isn't mod10 valid. ## Contributing 1. Fork it ( https://github.com/[my-github-username]/mod_10/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Enumerate adds an `enumerate` command to all ActiveRecord models, enabling you to work with string or integer columns as if they were enums. The following features are added to your model: Validation - ensures that the field only receives accepted values Predicate Methods - adds ? and ! functions for each enum value Scopes - you can easily query for values of the enum
A simple file-system-based cache wrapper. The main method is 'with_cache( :cache_key=>'something_unique', :timeout_seconds=>(an integer) ){ (...) }' If the given cache key exists and has not timed out, it will return the cached value If not, it will * yield to the given block * store the result of the given block in the cache with the given key * return the result of the given block Required params: * :cache_key=>'some unique string that is valid in a filename' Optional params: * :timeout_seconds => (an integer - default 3600) * :cache_dir => (an absolute path - defaults to RAILS_ROOT/tmp/cache if RAILS_ROOT is defined, otherwise /tmp/cache ) Example usage: @stats_json = Itrigga::Cache::FileCache.with_cache(:cache_key=>'admin_stats.json', :timeout_seconds=>600){ /* some expensive remote API / slow IO call here /* }
Port of wickedbyte/int-to-uuid. Encodes a non-negative 64-bit unsigned integer and an optional 32-bit namespace into a valid RFC 9562 Version 8 UUID.
This is an improved input function for Ruby. Using this gem, you can easily get user input with real-time type validation, ensuring that the data provided is as expected, among other things. If you have any questions, check the documentation: https://github.com/barrosflavio/ruby_better_input Features: - Ask, receive and check input in a single line - Support for types such as integer, float and boolean. - Input validation with clear error messages. - Intuitive and easy-to-use function.
values_for makes your ActiveRecord-backed class work with an enumerable type. Instead of existing ActiveRecord plugins such as enum_fu, which store the enumerable attribute as an integer, values_for stores the content of the enumerable attribute in a varchar column of the database. The field will automatically validate using validates_inclusion_of and accepts all the same options. values_for will also optionally create named scopes, predicate methods, and constants defining the possible values for enumerable types on your model. By default, however, it avoids polluting your model with things you may not need unless these features are specifically requested.