Eval a JS string as if it was a file being required
Evaluate node require() module content directly
Simple JavaScript expression evaluator
evaluate statically-analyzable expressions
Get callsites from the V8 stack trace API
ECMAScript scope analyzer for ESLint
Mathematical expression evaluator fork with exports map, prototype pollution and code injection security fixes
A flexible math expression evaluator
Parse Content Security Policy directives.
require or eval modules
A library for teleporting rich data to another place.
Mark scopes for deopt which contain a direct eval call
decycle your json
JavaScript expression parsing and evaluation.
Alias for eval global.
Safely evaluate JavaScript (estree) expressions, sync and async.
Load a string as if it was an esm or commonjs module with a given filename.
Adds support for environments that disallow support of new Function
A simple cache for a few of the JS Error constructors.
Safer version of eval()
Eval a string with a passed scope
Build and evaluate JavaScript strings safely via tagged template literals
Vega expression parser and code generator.
Mathematical expression evaluator
Most existing gems that address command execution provide a limited interface or lack notable features. In contast, Exek seeks to provide comprehensive support for all of a program's exec needs with one thoughtfully-designed library. Intended features: - A "Command" class that encapsulates argv, env, and IO options, and process state. - Easy-to-use high level interfaces with sensible defaults for running commands to completion. - Comprehensive support for low-level concerns like piping, PTYs, and file descriptor magic. - Utilities for manipulating `sh` script strings, idiomatically building argument arrays, and generating reusable interaces for common system commands. - Tracing and introspection facilities for logging and latency analysis. - Safety: does not monkeypatch external modules, encourage mixins or use eval. Attempts to guide developers away from unsafe practices like shell scripts and shell injection.
* http://rubysideshow.rubyforge.org/irb_callbacks == DESCRIPTION: This gem adds callbacks to irb, intended for you to override at your discretion. == FEATURES: irb's control flow looks like this: loop: * prompt * eval * output This gem adds three callbacks to each phase. module IRB: * self.before_prompt * self.around_prompt (call yield) * self.after_prompt * self.before_eval * self.around_eval (call yield) * self.after_eval * self.before_output * self.around_output (call yield) * self.after_output == SYNOPSIS: # Here's my ~/.irbrc file (which is run at irb startup) require 'rubygems' require 'irb_callbacks' require 'benchmark' # This little snippet will time each command run via the console. module IRB def self.around_eval(&block) @timing = Benchmark.realtime do block.call end end def self.after_output puts "=> #{'%.3f' % @timing} seconds" end end # And a sample irb session: $ irb irb(main):001:0> 1_000_000.times { |x| x + 1 } => 1000000 => 0.330 seconds == CAVEATS: The three around_* callbacks all require you to call the block that's passed in. If you don't do it, undefined behavior may occur. == INSTALL: * sudo gem install irb_callbacks == LICENSE: (The MIT License) Copyright (c) 2008 Mike Judge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.