Allow parsing of optional catch bindings
Compile optional catch bindings
zlib port to javascript - fast, modularized, with browser support
read(1) for node programs
Resolve external $refs in OpenAPI (swagger) 2.0 / 3.x definitions
Core interfaces, types, and crypto abstraction for otplib
Resolve a URI relative to an optional base URI
Gracefully handle a Promise using async/await.
NodeJS Require that let you handle module not found error without try/catch
One-time password input component for React.
Gracefully handle a Promise using async/await.
Match human-quality input to potential matches by edit distance.
Get the first fulfilled promise that satisfies the provided testing function
JavaScript parser, mangler/compressor and beautifier toolkit
Isomorphic, functional type-checking for Javascript
Parse postgres array columns
TypeScript transformer that enforces error handling via branded Throws<T, E> types
just emit 'log' events on the process object
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Retry a promise-returning or async function
Inquirer input text prompt
functional try-catch wrapper
Merge CSS rules with PostCSS.
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
= input_chronic A simple Rack middleware that parses a dates using Chronic, and returns the result in a standardized manner. The idea is to use this to verify the input in date input fields using AJAX, to provide immediate feedback to the user. == Usage Include "input_chronic" in your middleware stack. In Rails, this is done in environment.rb config.gem 'bjornblomqvist-input_chronic', :lib => 'input_chronic', :source => 'http://gems.github.com' config.middleware.use "input_chronic" This will catch requests to /gems.github.com/bjornblomqvist/input_chronic. Use GET requests and provide a parameter 'date' or 'datetime'. The value will be parsed by Chronic and returned formatted as 2009-01-01 or 2009-01-01 12:45, depending on the parameter name. Don't forget to add the javascript found at /javascript/input_chronic.js This is also implemented by catching the request before it reaches rails. To use this on a text input add the class chronic_date or chronic_datetime <input type="text" class="chronic_datetime" /> == Copyright Copyright (c) 2009 Erik Hansson, Bjorn Blomqvist. See LICENSE for details.
An elegant solution for sanitizing user input. Cleaning & reformatting user data is a necessary chore for all developers; but it no longer needs to be time-consuming! The Sanitized suite of helpers allow you to quickly sanitize any ActiveRecord attribute, and easily add your own custom code to catch those edge cases. It will save you a surprisingly large amount of time!
= Livedate A simple Rack middleware that parses a dates using Chronic, and returns the result in a standardized manner. The idea is to use this to verify the input in date input fields using AJAX, to provide immediate feedback to the user. == Usage Include Livedate in your middleware stack. In Rails, this is done in environment.rb config.gem 'livedate' config.middleware.use "Livedate" Specify the desired date + datetime formats you want too. Default error message for strings that Chronic can't pass can also be provided. The defaults are: config.middleware.use "Livedate", :date_format => '%Y-%m-%d', :datetime_format => ''%Y-%m-%d %H:%M', :invalid_format => '' This will catch requests to /parsedate. Use GET requests and provide a parameter 'date' or 'datetime'. The value will be parsed by Chronic and returned formatted as 2009-01-01 or 2009-01-01 12:45, depending on the parameter name. == Scripts There are two generators available to get simple javascripts that use livedate. Both will replace the contents on input elements with classes .date or .datetime on change with the result from the Chronic parse. script/generate livedate_jquery script/generate livedate_prototype Will put the appropriate version of the script in your public/javascripts directory. Feel free to change these if you need a different behavior.
Problem: While Cucumber is an awesome tool, for some kinds of tests it's default behaviour becomes an obstacle. Testing large batches of input against a slow error prone system is the source of much frustration. Cucumber will skip remaining steps on failure or error. This is especially problematic if the test input is a dynamic collection, *(e.g. results of a database query). This is opposed to a static collection testing which is solved by a Scenario Outline. Solution: We need to step putside Cucumber's default pass/fail/error handling. Capture all failures and errors in collections. Log errors and failures. Generate a pass/fail manifest against the test inputs. Do not use this for normal BDD style testing, Cucumber's default behaviour is perfect for that. Public Interface: This is a works in progress so I expect changes as usage reveals more. In your cucumber env.rb Before do |scenario| setup_unstoppable end After do |scenario| print unstoppable_failures(scenario) print unstoppable_errors(scenario) end In a step definition wrap any operation that you do not wish to stop execution like so unstoppable do expect(thing).to be(exected_thing) end This helper method does the following: runs executes the block catches any exception 2a. adds error to errors collection if an error 2b. adds expectation failure to failures collection if error is an RSpec::Expectations::ExpectationNotMetError logs error/failure
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.