Recursively loop through the elements of a 'collection' (an array, an array-like object, or a plain object) and invoke 'callbackFn' for each element while protected against circular references.
Collection of Safe singleton deployments
Safer Node.js Buffer API
Give a regex, get a robust predicate function that tests it against a string.
Collection of Safe modules contract deployments
`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable
Unicode CLDR pluralization rules as JavaScript functions
Modern Buffer API polyfill without footguns
Push an array of items into an array, while being robust against prototype modification
Fault-tolerant CSS parser for PostCSS
A type-safe marriage of `EventTarget` and `EventEmitter`.
A better forEach
A CSS parser, transformer, and minifier written in Rust
Types and related utilities for TypeScript
A deep deletion module for node (like `rm -rf`)
URL and cookie safe UIDs
No description provided.
Edge parser to convert text markup to lexer tokens
detect possibly catastrophic, exponential-time regular expressions
detect possibly catastrophic, exponential-time regular expressions
Deterministic and safely JSON.stringify to quickly serialize JavaScript objects
safely create multiple ReadStream or WriteStream objects from the same file descriptor
A flexible way to handle safe area, also works on Android and web.
Prevent defined property getters from throwing errors
buffered-logger is designed to be used in multithreaded or multifiber rack servers and includes a middleware to automatically capture and write the buffered log statements during each request. This is ideal for keeping requests together for log parsing software such as splunk.
A gem to sign url and stream paths for Amazon CloudFront private content. Includes specific signing methods for both url and streaming paths, including html 'safe' escaped versions of each.
A thread-safe hash map where each key has its own TTL, with automatic expiration, max size eviction, expiration callbacks, and Enumerable support.
Chain multiple methods together safely without having to repeat the safe navigation operator for each call
A file system data base. Provides a thread-safe, process-safe Database class. Each entry is a separate file referenced by its relative path. Allows multiple file formats and serialization methods. Pure ruby and very light weight.
The flexible polyline encoding from heremaps is a lossy compressed representation of a list of coordinate pairs or coordinate triples. It achieves that by: 1. Reducing the decimal digits of each value. 2. Encoding only the offset from the previous point. 3. Using variable length for each coordinate delta. 4. Using 64 URL-safe characters to display the result. For more information, visit: https://github.com/heremaps/flexible-polyline
Podoy is gem suite of modules that each enables you to write clean, safe and idiomatic ruby code.
Will generate a content-security-policy based on images, scripts, stylesheets, frames andothers on each generated page. This script assumes that all your linked resources as 'safe'.Style attributes will also be converted into <style> elements and SHA256 hashes will begenerated for inline styles/scripts.
Sometimes you have an object that is not thread-safe, but you need to make sure each of its methods is thread-safe, because they deal with some resources, like files or databases and you want them to manage those resources sequentially. This small gem will help you achieve exactly that without any re-design of the objects you already have. Just decorate them with SyncEm decorator and that is it.
Enumancer provides a predictable, type-safe registry for named values. Each entry is unique by both name and value, with optional type constraints and strict mode.
== Synopsys Ruby Enumerable extension. Main idea is lazy computations within enumerators. == Usage Install as a gem: sudo gem install deferred_enum This gem introduces DeferredEnumerator class: ary = [1, 2, 3, 4] deferred = ary.defer # #<DeferredEnumerator: [1, 2, 3, 4]:each> DeferredEnumerator brings some optimizations to all?, any? and none? predicates deferred.all?(&:even?) # Will stop iteration after first false-result = 1 iteration deferred.none?(&:even?) # 2 iterations deferred.any?(&:even?) # 2 iterations It also introduces lazy versions of Enumerable's #select, #map and #reject methods deferred.map { |i| i + 1 } # #<DeferredEnumerator: #<Enumerator::Generator>:each> deferred.select { |i| i.even? } # #<DeferredEnumerator: #<Enumerator::Generator>:each> deferred.reject { |i| i.odd? } # #<DeferredEnumerator: #<Enumerator::Generator>:each> So you can safely chain your filters, they won't be treated as arrays: deferred.map(&:succ).select(&:even?) # #<DeferredEnumerator: #<Enumerator::Generator>:each> You can build chains of Enumerables: deferred.concat([2]).to_a # [1, 2, 3, 4, 2] Or append elements to the end of enumerator: deferred << 2 You can even remove duplicates from enumerator, though this operation can be tough: deferred.uniq # #<DeferredEnumerator: #<Enumerator::Generator>:each> There are many other methods in DeferredEnumerator, please refer to documentation.
Will generate a content-security-policy based on images, scripts, stylesheets, frames andothers on each generated page. This script assumes that all your linked resources as 'safe'.Style attributes will also be converted into <style> elements and SHA256 hashes will begenerated for inline styles/scripts.