Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
var Arr = require("divhide").Arr; | ||
var Arr = Divhide.Arr; | ||
@@ -4,0 +4,0 @@ var value = Arr.index([1 ,2, 3], 0); |
var Assert = require("divhide").Assert; | ||
var Assert = Divhide.Assert; | ||
@@ -4,0 +4,0 @@ /// Test if the value is valid |
/// Assertion builder | ||
var Assertion = require("divhide").Assertion; | ||
var Assertion = Divhide.Assertion; | ||
@@ -5,0 +5,0 @@ /// Create the custom Assert facility |
var Chain = require("divhide").Chain; | ||
var Chain = Divhide.Chain; | ||
@@ -4,0 +4,0 @@ |
var Exception = require("divhide").Exception.Exception; | ||
var Exception = Divhide.Exception.Exception; | ||
@@ -4,0 +4,0 @@ /// the external translation data |
var Exception = require("divhide").Exception.Exception, | ||
ExceptionList = require("divhide").Exception.ExceptionList; | ||
var Exception = Divhide.Exception.Exception, | ||
ExceptionList = Divhide.Exception.ExceptionList; | ||
@@ -5,0 +5,0 @@ |
var Obj = require("divhide").Obj; | ||
var Obj = Divhide.Obj; | ||
@@ -4,0 +4,0 @@ var results = Obj.filter({ "one": 1, "two": 2 }); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.array(1); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.boolean(true); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var fn = Safe.function(function(){}); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.length([1, 2]); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.number(1); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.object({ one: 1 }); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
var value = Safe.regexp(/regexp/); // returns /regexp/ | ||
var value = Safe.regexp("/regexp/"); // returns /regexp/ | ||
var value = Safe.regexp(""); // returns /^$/ | ||
var value = Safe.regexp("name"); // returns /^name$/ | ||
var value = Safe.regexp({}, /regex/); // returns /regexp/ | ||
var value = Safe.regexp(/regexp/); | ||
expect(value) | ||
.toEqual(/regexp/); | ||
var value = Safe.regexp("/regexp/"); | ||
expect(value) | ||
.toEqual(/regexp/); | ||
var value = Safe.regexp(""); | ||
expect(value) | ||
.toEqual(/^$/); | ||
var value = Safe.regexp("name"); | ||
expect(value) | ||
.toEqual(/^name$/); | ||
var value = Safe.regexp({}, /regexp/); | ||
expect(value) | ||
.toEqual(/regexp/); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.string(""); |
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -4,0 +4,0 @@ var value = Safe.value(1); |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ var schema = Schema |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ var schema = Schema.number() |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ var schema = |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ |
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -4,0 +4,0 @@ |
var Type = require("divhide").Type; | ||
var Type = Divhide.Type; | ||
@@ -4,0 +4,0 @@ var type = Type.of({}); |
# [![Divhide](http://blog.divhide.com/assets/images/divhide_128px.png)](http://divhide.com/) divhide-core | ||
[![Build Status](https://travis-ci.org/divhide/divhide-core.png?branch=master)](https://travis-ci.org/divhide/divhide-core) | ||
[![NPM version](https://badge.fury.io/js/divhide.svg)](http://badge.fury.io/js/divhide) | ||
[![Dependency Status](https://gemnasium.com/divhide/divhide-core.svg)](https://gemnasium.com/divhide/divhide-core) | ||
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=NYVPSL7GBYD6A&lc=US&item_name=Oscar%20Brito¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) | ||
{%= _.badge("travis") %} {%= _.badge("fury") %} {%= _.badge("gemnasium") %} | ||
{%= _.badge("donate") %} | ||
Javascript codebase to use on the Browser, NodeJS and other javascript platforms. This provides a set of utilities that are | ||
common among server-side and client-side applications. | ||
**Attention:** Not ready to be used! First release soon! | ||
Javascript codebase to use on the Browser, NodeJS and other javascript platforms. This provides a set of utilities that you can use everywhere. | ||
{%= _.include("Install.md") %} | ||
{%= toc %} | ||
## Installation | ||
{%= _.doc("Index.md") %} | ||
## API | ||
{%= toc %} | ||
### Type | ||
@@ -54,2 +49,5 @@ {%= _.doc("Common/Type.md") %} | ||
## Contribute | ||
{%= _.include("Contribute.md") %} | ||
## Authors | ||
@@ -56,0 +54,0 @@ {%= _.contrib("authors.md") %} |
{ | ||
"name": "divhide", | ||
"description": "Divhide javascript core components for NodeJs and Browser.", | ||
"description": "Divhide javascript core components for NodeJs, Browser, Titanium, ... and everything that run javascript.", | ||
"homepage": "https://github.com/divhide/divhide-core", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"version": "1.0.0-alpha.2", | ||
@@ -27,15 +28,19 @@ "authors": [ | ||
"license": "MIT", | ||
"ignore": [ | ||
"node_modules", | ||
"bower_components", | ||
".tests", | ||
".gitignore", | ||
".npmignore", | ||
".travis.yml", | ||
".gruntfile.js", | ||
".package.json", | ||
"TODO.txt" | ||
] | ||
"ignore": [ | ||
"node_modules", | ||
"bower_components", | ||
".tests", | ||
".gitignore", | ||
".npmignore", | ||
".travis.yml", | ||
"README.md", | ||
"gruntfile.js", | ||
"package.json", | ||
"bower.json", | ||
"src", | ||
"lib" | ||
], | ||
"main": "dist/divhide.js" | ||
} |
121
package.json
{ | ||
"name": "divhide", | ||
"description": "Divhide javascript core components for NodeJs and Browser.", | ||
"version": "1.0.0-alpha.1", | ||
"author": { | ||
"name" : "Oscar Brito", | ||
"url" : "https://twitter.com/aetheon" | ||
}, | ||
"keywords": [ | ||
"divhide", | ||
"utils", | ||
"validation", | ||
"type", | ||
"schema", | ||
"safe", | ||
"i18n", | ||
"chain", | ||
"error", | ||
"exception", | ||
"assert" | ||
], | ||
"license": "MIT", | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "git@github.com:divhide/divhide-core.git" | ||
}, | ||
"devDependencies": { | ||
"grunt" : "~0.4.0", | ||
"grunt-cli" : "", | ||
"load-grunt-tasks" : "1.0.0", | ||
"grunt-http-server" : "*", | ||
"grunt-contrib-watch" : "*", | ||
"grunt-contrib-jshint" : "*", | ||
"grunt-contrib-jasmine" : ">=0.6.3", | ||
"grunt-simple-mocha" : ">=0.4.0", | ||
"expect.js" : ">=0.2.0", | ||
"grunt-browserify" : "=2.1.4", | ||
"grunt-readme" : "0.4.5" | ||
}, | ||
"dependencies": { | ||
"q" : ">=2.0.1", | ||
"lodash" : ">=1.3" | ||
}, | ||
"main": "src/Index.js", | ||
"engines": { | ||
"node": ">=0.10.2" | ||
}, | ||
"scripts": { | ||
"test": "grunt travis --verbose" | ||
} | ||
} | ||
"name": "divhide", | ||
"description": "Divhide javascript core components for NodeJs, Browser, Titanium, ... and everything that run javascript.", | ||
"version": "1.0.0-alpha.2", | ||
"author": { | ||
"name": "Oscar Brito <aetheon@gmail.com>", | ||
"url": "https://twitter.com/aetheon" | ||
}, | ||
"keywords": [ | ||
"divhide", | ||
"utils", | ||
"validation", | ||
"type", | ||
"schema", | ||
"safe", | ||
"i18n", | ||
"chain", | ||
"error", | ||
"exception", | ||
"assert" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:divhide/divhide-core.git" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^8.0.2", | ||
"expect.js": ">=0.2.0", | ||
"grunt": "~0.4.5", | ||
"grunt-browserify": "~3.2.1", | ||
"grunt-bump": "0.0.16", | ||
"grunt-cli": "", | ||
"grunt-contrib-jasmine": ">=0.6.3", | ||
"grunt-contrib-jshint": "*", | ||
"grunt-contrib-watch": "*", | ||
"grunt-exec": "^0.4.6", | ||
"grunt-http-server": "*", | ||
"grunt-readme": "0.4.5", | ||
"grunt-simple-mocha": ">=0.4.0", | ||
"load-grunt-tasks": "2.0.0" | ||
}, | ||
"dependencies": { | ||
"q": ">=2.0.1", | ||
"lodash": ">=1.3" | ||
}, | ||
"main": "src/Index.js", | ||
"engines": { | ||
"node": ">=0.10.2" | ||
}, | ||
"scripts": { | ||
"test": "grunt travis --verbose" | ||
} | ||
} |
209
README.md
# [![Divhide](http://blog.divhide.com/assets/images/divhide_128px.png)](http://divhide.com/) divhide-core | ||
[![Build Status](https://travis-ci.org/divhide/divhide-core.png?branch=master)](https://travis-ci.org/divhide/divhide-core) | ||
[![NPM version](https://badge.fury.io/js/divhide.svg)](http://badge.fury.io/js/divhide) | ||
[![Dependency Status](https://gemnasium.com/divhide/divhide-core.svg)](https://gemnasium.com/divhide/divhide-core) | ||
[![Build Status](https://travis-ci.org/divhide/divhide-core.png?branch=master)](https://travis-ci.org/divhide/divhide-core) [![NPM version](https://badge.fury.io/js/divhide.svg)](http://badge.fury.io/js/divhide) [![Dependency Status](https://gemnasium.com/divhide/divhide-core.svg)](https://gemnasium.com/divhide/divhide-core) | ||
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=NYVPSL7GBYD6A&lc=US&item_name=Oscar%20Brito¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) | ||
Javascript codebase to use on the Browser, NodeJS and other javascript platforms. This provides a set of utilities that are | ||
common among server-side and client-side applications. | ||
Javascript codebase to use on the Browser, NodeJS and other javascript platforms. This provides a set of utilities that you can use everywhere. | ||
**Attention:** Not ready to be used! First release soon! | ||
### Install | ||
* [Installation](#installation) | ||
* [API](#api) | ||
* [Type](#type) | ||
* [Safe](#safe) | ||
* [Obj](#obj) | ||
* [Arr](#arr) | ||
* [I18N](#i18n) | ||
* [Exception](#exception) | ||
* [Chain](#chain) | ||
* [Assert](#assert) | ||
* [Assertion](#assertion) | ||
* [Schema](#schema) | ||
* [Authors](#authors) | ||
* [License](#license) | ||
### ![alt text](https://raw.githubusercontent.com/divhide/divhide-core/master/.readme/assets/nodejs-logo.jpg "Node.js") | ||
## Installation | ||
``` | ||
### ![alt text](https://raw.github.com/aetheon/js-utils-amd/master/img/logos/nodejs.png "Node.js") Nodejs | ||
npm install divhide | ||
``` | ||
npm install divhide | ||
``` js | ||
var Divhide = require("divhide"); | ||
... | ||
``` | ||
### ![alt text](https://raw.github.com/aetheon/js-utils-amd/master/img/logos/bower.png "Bower") Bower | ||
### ![alt text](https://raw.githubusercontent.com/divhide/divhide-core/master/.readme/assets/bower-logo.jpg "Bower") | ||
@@ -57,3 +46,3 @@ ``` | ||
<script type="text/javascript"> | ||
var Divhide = require("divhide"); | ||
var fn = Divhide.Safe.function(); | ||
... | ||
@@ -65,16 +54,23 @@ </script> | ||
### Build | ||
``` bash | ||
grunt | ||
## API | ||
* [API](#api) | ||
* [Type](#type) | ||
* [Safe](#safe) | ||
* [Obj](#obj) | ||
* [Arr](#arr) | ||
* [I18N](#i18n) | ||
* [Exception](#exception) | ||
* [Chain](#chain) | ||
* [Assert](#assert) | ||
* [Assertion](#assertion) | ||
* [Schema](#schema) | ||
* [Contribute](#contribute) | ||
* [Authors](#authors) | ||
* [License](#license) | ||
``` | ||
## API | ||
### Type | ||
@@ -88,3 +84,3 @@ | ||
var Type = require("divhide").Type; | ||
var Type = Divhide.Type; | ||
@@ -171,3 +167,3 @@ var type = Type.of({}); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -201,3 +197,3 @@ var value = Safe.array(1); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -238,3 +234,3 @@ var value = Safe.boolean(true); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -260,3 +256,3 @@ var fn = Safe.function(function(){}); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -282,3 +278,3 @@ var value = Safe.length([1, 2]); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -307,3 +303,3 @@ var value = Safe.number(1); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -327,12 +323,26 @@ var value = Safe.object({ one: 1 }); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
var value = Safe.regexp(/regexp/); // returns /regexp/ | ||
var value = Safe.regexp("/regexp/"); // returns /regexp/ | ||
var value = Safe.regexp(""); // returns /^$/ | ||
var value = Safe.regexp("name"); // returns /^name$/ | ||
var value = Safe.regexp({}, /regex/); // returns /regexp/ | ||
var value = Safe.regexp(/regexp/); | ||
expect(value) | ||
.toEqual(/regexp/); | ||
var value = Safe.regexp("/regexp/"); | ||
expect(value) | ||
.toEqual(/regexp/); | ||
var value = Safe.regexp(""); | ||
expect(value) | ||
.toEqual(/^$/); | ||
var value = Safe.regexp("name"); | ||
expect(value) | ||
.toEqual(/^name$/); | ||
var value = Safe.regexp({}, /regexp/); | ||
expect(value) | ||
.toEqual(/regexp/); | ||
``` | ||
@@ -343,3 +353,3 @@ | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -363,3 +373,3 @@ var value = Safe.string(""); | ||
var Safe = require("divhide").Safe; | ||
var Safe = Divhide.Safe; | ||
@@ -395,3 +405,3 @@ var value = Safe.value(1); | ||
var Obj = require("divhide").Obj; | ||
var Obj = Divhide.Obj; | ||
@@ -422,3 +432,3 @@ var results = Obj.filter({ "one": 1, "two": 2 }); | ||
var Arr = require("divhide").Arr; | ||
var Arr = Divhide.Arr; | ||
@@ -483,21 +493,3 @@ var value = Arr.index([1 ,2, 3], 0); | ||
var I18NString = require("divhide").I18N.String; | ||
/// the external translation data | ||
var Portuguese = { | ||
"hello <%= username %>": "olá <%= username %>" | ||
}; | ||
/// create a I18NString (message + data) | ||
var message = new I18NString("hello <%= username %>", { username: "oscar" }); | ||
/// Gets the English message | ||
var en = message.toString(); | ||
expect(en).toBe("hello oscar"); | ||
/// Gets the Portuguese message | ||
var en = message.toString(Portuguese); | ||
expect(en).toBe("olá oscar"); | ||
``` | ||
@@ -521,3 +513,3 @@ | ||
var Exception = require("divhide").Exception.Exception; | ||
var Exception = Divhide.Exception.Exception; | ||
@@ -556,4 +548,4 @@ /// the external translation data | ||
var Exception = require("divhide").Exception.Exception, | ||
ExceptionList = require("divhide").Exception.ExceptionList; | ||
var Exception = Divhide.Exception.Exception, | ||
ExceptionList = Divhide.Exception.ExceptionList; | ||
@@ -593,3 +585,3 @@ | ||
var Chain = require("divhide").Chain; | ||
var Chain = Divhide.Chain; | ||
@@ -660,3 +652,3 @@ | ||
var Assert = require("divhide").Assert; | ||
var Assert = Divhide.Assert; | ||
@@ -736,3 +728,3 @@ /// Test if the value is valid | ||
/// Assertion builder | ||
var Assertion = require("divhide").Assertion; | ||
var Assertion = Divhide.Assertion; | ||
@@ -802,3 +794,3 @@ /// Create the custom Assert facility | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -883,3 +875,3 @@ | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -940,3 +932,3 @@ | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -1003,3 +995,3 @@ var schema = Schema.number() | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -1046,3 +1038,3 @@ var schema = Schema | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -1091,3 +1083,3 @@ var schema = | ||
var Schema = require("divhide").Schema; | ||
var Schema = Divhide.Schema; | ||
@@ -1167,2 +1159,55 @@ | ||
## Contribute | ||
#### Testing | ||
The purpose of the project is to provide a library that can be used across every platform that uses javascript. The tests are done using jasmine and using the browser to debug. Every file save on the "src" folder will recompile | ||
the browserify bundle. | ||
``` bash | ||
grunt dev | ||
``` | ||
#### Build | ||
The build process will run a set of tasks including linting and testing. To contribute please add | ||
tests to the fix/feature you've worked. | ||
Also, when building the documention is compiled into the README.md. Each module iniside the "src" directory | ||
should contain a ".md" file to document it's behaviour. | ||
The following command will run the build. | ||
``` bash | ||
grunt | ||
``` | ||
#### Release | ||
``` bash | ||
## change the package.json, bower.json pre-release version (v1.0.0-1) | ||
## , commit to repo | ||
## , and publish to npm and bower | ||
grunt release | ||
## change the package.json, bower.json minor version (v1.0.1) | ||
## , commit to repo | ||
## , and publish to npm and bower | ||
grunt minor-release | ||
``` | ||
## Authors | ||
@@ -1179,4 +1224,4 @@ | ||
## License | ||
Copyright (c) 2014 Oscar Brito, contributors. | ||
Copyright (c) 2014 Oscar Brito <aetheon@gmail.com>, contributors. | ||
Released under the license | ||
"use strict"; | ||
var Schema = require("./Schema/Schema"); | ||
var Schema = require("./CustomSchema"); | ||
module.exports = new Schema(); |
@@ -136,5 +136,14 @@ 'use strict'; | ||
/** | ||
* | ||
* Custom Schema | ||
* | ||
* @type {Object} | ||
* | ||
*/ | ||
CustomSchema: require("./Common/CustomSchema"), | ||
}; | ||
module.exports = Common; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1309281
88
24926
1200
14
4