javascript-validator 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8a935aae09b2e3123e35c39207338a232d8af5cb
4
+ data.tar.gz: 20a56f4b867fc552c0621a1298268fcdd6192954
5
+ SHA512:
6
+ metadata.gz: 357af557d4d835a8e839f7740fab26b7d3def71f47287e6877170ea65d51324c858bd9c4ce49aa0504ef8623ac597ca658d533c9295deee24165dcb43caf675c
7
+ data.tar.gz: 55d4c0b39611cb5f8400de3ea7d755d7baf3d219b679f6295b44e47e66e887dccf082ec9e6a6641eef288819b3c8c3b256f84c8ba8dc76d80695a297307dc5f4
@@ -0,0 +1 @@
1
+ //= require javascript-validator
@@ -0,0 +1 @@
1
+ var jv;!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){jv=a("./index.js")},{"./index.js":2}],2:[function(a,b,c){"use strict";var d=a("./lib"),e=function(){function a(){this.value=null,this.result=null,this.log=d._log,this.logging=d.logging,this.keys=d.types.keys,this._objectEmpty=function(a){return"object"==typeof a&&0===Object.keys(a).length},this._set=function(a){this._objectEmpty(arguments)||d.types.isNull(a)||(this.value!==a&&this.result?this.result=void 0:this.result=!1,this.value=a)},this._reset=function(a){this.value=a,this.result=void 0},this._non_chain_reset=function(){this.value=null,this.result=!0},this._is=function(a){return d.types.isNonEmptyString(a)&&d.types.has(d.types,a)&&d.types.isFunction(d.types[a])?d.types[a](this.value):!1},this.compare=function(a){var b,c;return d.types.isObject(a)&&(d.types.has(a,"definition")&&(b=a.definition),d.types.has(a,"callback")&&(c=a.callback)),("undefined"==typeof this.result||this.result)&&(this.result=d.compare(this.value,b,c)),this},this.translate=function(a){var b;return d.types.isObject(a)&&(d.types.has(a,"value")&&this._set(a.value),d.types.has(a,"definition")&&(b=a.definition)),("undefined"==typeof this.result||this.result)&&(this.result=d.translate(this.value,b)),this},this.has=function(a){return("undefined"==typeof this.result||this.result)&&(d.types.isString(a)?this.result=d.types.has(this.value,a):this.result=!1),this}}return new a}(),f=function(a){return e._reset(a),e};f.keys={},f.sync={},e.another={},Object.keys(e.keys).map(function(a){"has"!==a&&(f.keys[a]=e.keys[a])}),Object.keys(d.types.keys).map(function(a){f[a]=function(b){return e._non_chain_reset(),e._set(b),("undefined"==typeof e.result||e.result)&&(e.result=e._is(a)),e},e.another[a]=function(b){return e._set(b),("undefined"==typeof e.result||e.result)&&(e.result=e._is(a)),e},e.hasOwnProperty(a)||Object.defineProperty(e,a,{get:function(){return("undefined"==typeof this.result||e.result)&&(this.result=this._is(a)),this}})}),Object.keys(d.types.keys).map(function(a){f.sync[a]=d.types[a]}),f.version="1.2.2",b.exports=f},{"./lib":3}],3:[function(a,b,c){"use strict";function d(a){j&&l.isObject(console)&&l.has(console,"log")&&l.isFunction(console.log)&&console.log(a)}function e(a){j=a}function f(a,b){return l.isFunction(l[b])?l[b](a):!1}function g(a,b){var c,d,e,h,i,j,k;if(c=Object.keys(a),l.has(b,"required")&&l.isArray(b.required)&&(i=b.required),l.has(b,"props")&&l.isObject(b.props)&&!l.isArray(b.props)&&(d=Object.keys(b.props)),!l.isArray(c)||!l.isArray(d))throw new Error("defintion or comparison object invalid");return l.isArray(i)&&i.map(function(a){if(-1===c.indexOf(a))throw new Error("required property {"+a+"} missing")}),d.map(function(d){if(e=a[d],h=b.props[d],j=i?-1!==i.indexOf(d):-1!==c.indexOf(d),!e||e&&l.isString(h)&&(!f(e,h)||!j))throw new Error(d+": {value:"+e+"} {expected: "+b.props[d]+"}");e&&!l.isNull(h)&&l.isObject(h)&&!l.isString(h)&&g(e,h)}),!k}function h(a,b){var c;if(!l.isArray(a)||!l.isObject(b)&&!l.isString(b))throw new Error("invalid collection or definition");return a.map(function(a,c){if(!k(a,b))throw new Error("array index "+c+": {value:"+a+"} {expected: "+b+"}")}),!c}function i(a,b){function c(a,b){var c,d;if(!l.isString(b))throw new Error("could not parse options identifier");return c=b.split("."),l.isArray(c)&&(d=a,c.map(function(a){if(!l.has(d,a))throw new Error("could not find "+a+" during translation");d=d[a]})),d}var d;return d={},Object.keys(b).map(function(e){d[e]=c(a,b[e])}),d}var j,k,l=a("./types");k=function(a,b,c){var e,i,j,k,m;if(j=!l.isNull(a)&&l.isObject(a),k=!l.isNull(b)&&l.isObject(b),m=l.isNonEmptyString(b)&&l.has(l,b),j&&!l.isArray(a)&&k)try{e=g(a,b)}catch(n){d(n.stack),i=n}else if(j&&l.isArray(a)&&(k||m&&"array"!==b))try{e=h(a,b)}catch(o){d(o.stack),i=o}else m&&(e=f(a,b));return l.isFunction(c)?void c(i,e):(i&&(e=!1),e)},c.types=l,c.compare=k,c.translate=i,c.logging=e,c._log=d},{"./types":4}],4:[function(a,b,c){"use strict";var d=a("./objects"),e=a("./strings"),f=[],g={};f.push(d),f.push(e),f.map(function(a){Object.keys(a).map(function(b){c[b]=a[b],g[b]=b})}),c.keys=g},{"./objects":5,"./strings":6}],5:[function(a,b,c){"use strict";var d=function(){return{isNull:function(a){return"undefined"==typeof a||"object"==typeof a&&null===a},isObject:function(a){return"object"==typeof a&&null!==a},isArray:function(a){return!d.isNull(a)&&a instanceof Array},isDate:function(a){return!d.isNull(a)&&a instanceof Date},isString:function(a){return!d.isNull(a)&&(a instanceof String||"string"==typeof a)},isNumber:function(a){return!d.isNull(a)&&("number"==typeof a||a instanceof Number)&&!isNaN(a)},isInt:function(a){return d.isNumber(a)&&-1===a.toString().indexOf(".")},isFunction:function(a){return"function"==typeof a&&a instanceof Function},has:function(a,b){return!d.isNull(a)&&a.hasOwnProperty(b)}}}();Object.keys(d).map(function(a){c[a]=d[a]})},{}],6:[function(a,b,c){"use strict";var d=function(){return{_whitespace:new RegExp(/\s/g),isNullOrEmpty:function(a){return"string"==typeof a?""===a.replace(d._whitespace,""):!0},isNonEmptyString:function(a){return"string"==typeof a&&!d.isNullOrEmpty(a)},isNumericString:function(a){return d.isNonEmptyString(a)&&!isNaN(a)},isDateString:function(a){try{return d.isNonEmptyString(a)&&!isNaN(Date.parse(a))}catch(b){return!1}}}}();Object.keys(d).map(function(a){"_whitespace"!==a&&(c[a]=d[a])})},{}]},{},[1]);
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "javascript/validator"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,8 @@
1
+ require "javascript/validator/version"
2
+
3
+ module Javascript
4
+ module Validator
5
+ class Engine < Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module Javascript
2
+ module Validator
3
+ VERSION = "0.1.10"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: javascript-validator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.10
5
+ platform: ruby
6
+ authors:
7
+ - nicholas john james nguyen-dunn
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-11-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: This gem is for including https://www.npmjs.com/package/javascript-validator
42
+ email:
43
+ - sbg.nick.dunn@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - lib/javascript/validator/version.rb
49
+ - lib/javascript/validator.rb
50
+ - bin/console
51
+ - bin/setup
52
+ - app/assets/javascript/application.js
53
+ - app/assets/javascript/javascript-validator.js
54
+ homepage: https://bitbucket.org/sbgorilla/javascript-validator#readme
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.0.14
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Ruby gem for javascript-validator
78
+ test_files: []