├── spec
├── index.d.ts
├── common
│ ├── dateconverter.ts
│ └── dateconverter.js
├── serialize.ts
├── index.ts
├── index.js
├── serialize.js
└── reports
│ └── Test Results - spec_index_ts - 20160816.html
├── .bowerrc
├── .gitattributes
├── typings.json
├── bower.json
├── .gitignore
├── libs
├── utils.d.ts
├── utils.ts
└── utils.js
├── tsconfig.json
├── bower_components
├── mocha
│ ├── bower.json
│ ├── media
│ │ └── logo.svg
│ ├── .bower.json
│ ├── LICENSE
│ ├── Readme.md
│ ├── mocha.css
│ └── History.md
└── chai
│ ├── bower.json
│ ├── karma.conf.js
│ ├── .bower.json
│ ├── karma.sauce.js
│ ├── package.json
│ ├── component.json
│ ├── sauce.browsers.js
│ ├── README.md
│ ├── ReleaseNotes.md
│ └── History.md
├── LICENSE
├── package.json
├── index.d.ts
├── README.md
├── index.js
├── typings
├── mocha
│ └── mocha.d.ts
└── chai
│ └── chai.d.ts
└── index.ts
/spec/index.d.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "bower_components"
3 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=Typescript
2 | *.css linguist-language=Typescript
3 | *.html linguist-language=Typescript
--------------------------------------------------------------------------------
/typings.json:
--------------------------------------------------------------------------------
1 | {
2 | "globalDependencies": {
3 | "reflect-metadata": "registry:dt/reflect-metadata#0.0.0+20161005184000"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "index",
3 | "private": true,
4 | "dependencies": {
5 | "chai": "~1.8.0",
6 | "mocha": "~1.14.0"
7 | },
8 | "devDependencies": {}
9 | }
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 |
3 | #libraries
4 | node_modules
5 |
6 | #ide settings
7 | .idea
8 | .log
9 |
10 | #source map
11 | *.map
12 | documentation/
13 |
--------------------------------------------------------------------------------
/libs/utils.d.ts:
--------------------------------------------------------------------------------
1 | export declare function isTargetType(val: any, type: "object" | "string"): boolean;
2 | export declare function isPrimitiveOrPrimitiveClass(obj: any): boolean;
3 | export declare function isArrayOrArrayClass(clazz: Function): boolean;
4 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "sourceMap": true,
6 | "experimentalDecorators": true,
7 | "emitDecoratorMetadata": true,
8 | "noImplicitAny": true
9 | },
10 | "exclude": [
11 | "node_modules"
12 | ]
13 | }
--------------------------------------------------------------------------------
/spec/common/dateconverter.ts:
--------------------------------------------------------------------------------
1 | import {ICustomConverter} from '../../index';
2 |
3 | const dateConverter: ICustomConverter = {
4 | fromJson(data: any): any {
5 | return new Date(data);
6 | },
7 |
8 | toJson(data: any): any {
9 | return 'some-date';
10 | }
11 | };
12 |
13 | export default dateConverter;
--------------------------------------------------------------------------------
/spec/common/dateconverter.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | var dateConverter = {
3 | fromJson: function (data) {
4 | return new Date(data);
5 | },
6 | toJson: function (data) {
7 | return 'some-date';
8 | }
9 | };
10 | Object.defineProperty(exports, "__esModule", { value: true });
11 | exports.default = dateConverter;
12 | //# sourceMappingURL=dateconverter.js.map
--------------------------------------------------------------------------------
/bower_components/mocha/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mocha",
3 | "version": "1.12.0",
4 | "main": "mocha.js",
5 | "ignore": [
6 | "bin",
7 | "editors",
8 | "images",
9 | "lib",
10 | "support",
11 | "test",
12 | ".gitignore",
13 | ".npmignore",
14 | ".travis.yml",
15 | "component.json",
16 | "index.js",
17 | "Makefile",
18 | "package.json"
19 | ]
20 | }
--------------------------------------------------------------------------------
/libs/utils.ts:
--------------------------------------------------------------------------------
1 | export function isTargetType(val:any, type:"object" | "string"):boolean {
2 | return typeof val === type;
3 | }
4 |
5 | export function isPrimitiveOrPrimitiveClass(obj:any):boolean {
6 | return !!(['string', 'boolean', 'number'].indexOf((typeof obj)) > -1 || (obj instanceof String || obj === String ||
7 | obj instanceof Number || obj === Number ||
8 | obj instanceof Boolean || obj === Boolean));
9 | }
10 |
11 | export function isArrayOrArrayClass(clazz:Function):boolean {
12 | if (clazz === Array) {
13 | return true;
14 | }
15 | return Object.prototype.toString.call(clazz) === '[object Array]'
16 | }
17 |
--------------------------------------------------------------------------------
/bower_components/chai/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai"
3 | , "version": "1.8.1"
4 | , "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic."
5 | , "license": "MIT"
6 | , "keywords": [
7 | "test"
8 | , "assertion"
9 | , "assert"
10 | , "testing"
11 | , "chai"
12 | ]
13 | , "main": "chai.js"
14 | , "ignore": [
15 | "build"
16 | , "components"
17 | , "lib"
18 | , "node_modules"
19 | , "support"
20 | , "test"
21 | , "index.js"
22 | , "Makefile"
23 | , ".*"
24 | ]
25 | , "dependencies": {}
26 | , "devDependencies": {}
27 | }
28 |
--------------------------------------------------------------------------------
/bower_components/mocha/media/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/bower_components/chai/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 | basePath: ''
4 | , frameworks: [ 'mocha' ]
5 | , files: [
6 | 'build/build.js'
7 | , 'test/bootstrap/karma.js'
8 | , 'test/*.js'
9 | ]
10 | , exclude: []
11 | , reporters: [ 'progress' ]
12 | , port: 9876
13 | , colors: true
14 | , logLevel: config.LOG_INFO
15 | , autoWatch: false
16 | , browsers: [ 'PhantomJS' ]
17 | , captureTimeout: 60000
18 | , singleRun: true
19 | });
20 |
21 | switch (process.env.CHAI_TEST_ENV) {
22 | case 'sauce':
23 | require('./karma.sauce')(config);
24 | break;
25 | default:
26 | // ...
27 | break;
28 | };
29 | };
30 |
--------------------------------------------------------------------------------
/bower_components/mocha/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mocha",
3 | "version": "1.14.0",
4 | "main": "mocha.js",
5 | "ignore": [
6 | "bin",
7 | "editors",
8 | "images",
9 | "lib",
10 | "support",
11 | "test",
12 | ".gitignore",
13 | ".npmignore",
14 | ".travis.yml",
15 | "component.json",
16 | "index.js",
17 | "Makefile",
18 | "package.json"
19 | ],
20 | "homepage": "https://github.com/mochajs/mocha",
21 | "_release": "1.14.0",
22 | "_resolution": {
23 | "type": "version",
24 | "tag": "1.14.0",
25 | "commit": "10c65f379c4501269c83a719a04bd2fb0013f853"
26 | },
27 | "_source": "https://github.com/mochajs/mocha.git",
28 | "_target": "~1.14.0",
29 | "_originalSource": "mocha"
30 | }
--------------------------------------------------------------------------------
/libs/utils.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | function isTargetType(val, type) {
3 | return typeof val === type;
4 | }
5 | exports.isTargetType = isTargetType;
6 | function isPrimitiveOrPrimitiveClass(obj) {
7 | return !!(['string', 'boolean', 'number'].indexOf((typeof obj)) > -1 || (obj instanceof String || obj === String ||
8 | obj instanceof Number || obj === Number ||
9 | obj instanceof Boolean || obj === Boolean));
10 | }
11 | exports.isPrimitiveOrPrimitiveClass = isPrimitiveOrPrimitiveClass;
12 | function isArrayOrArrayClass(clazz) {
13 | if (clazz === Array) {
14 | return true;
15 | }
16 | return Object.prototype.toString.call(clazz) === '[object Array]';
17 | }
18 | exports.isArrayOrArrayClass = isArrayOrArrayClass;
19 | //# sourceMappingURL=utils.js.map
--------------------------------------------------------------------------------
/bower_components/chai/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai",
3 | "version": "1.8.1",
4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
5 | "license": "MIT",
6 | "keywords": [
7 | "test",
8 | "assertion",
9 | "assert",
10 | "testing",
11 | "chai"
12 | ],
13 | "main": "chai.js",
14 | "ignore": [
15 | "build",
16 | "components",
17 | "lib",
18 | "node_modules",
19 | "support",
20 | "test",
21 | "index.js",
22 | "Makefile",
23 | ".*"
24 | ],
25 | "dependencies": {},
26 | "devDependencies": {},
27 | "homepage": "https://github.com/chaijs/chai",
28 | "_release": "1.8.1",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "1.8.1",
32 | "commit": "4107c02cb1507c8554177aeeefd9732abcfd4e64"
33 | },
34 | "_source": "https://github.com/chaijs/chai.git",
35 | "_target": "~1.8.0",
36 | "_originalSource": "chai"
37 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Ailun She
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/bower_components/mocha/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2011-2013 TJ Holowaychuk
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | 'Software'), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/bower_components/chai/karma.sauce.js:
--------------------------------------------------------------------------------
1 | var version = require('./package.json').version;
2 | var ts = new Date().getTime();
3 |
4 | module.exports = function(config) {
5 | var auth;
6 |
7 | try {
8 | auth = require('./test/auth/index');
9 | } catch(ex) {
10 | auth = {};
11 | auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null;
12 | auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null;
13 | }
14 |
15 | if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return;
16 | if (process.env.SKIP_SAUCE) return;
17 |
18 | var branch = process.env.TRAVIS_BRANCH || 'local'
19 | var browserConfig = require('./sauce.browsers');
20 | var browsers = Object.keys(browserConfig);
21 | var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ];
22 | var tunnel = process.env.TRAVIS_JOB_NUMBER || ts;
23 |
24 | if (process.env.TRAVIS_JOB_NUMBER) {
25 | tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER);
26 | }
27 |
28 | config.browsers = config.browsers.concat(browsers);
29 | config.customLaunchers = browserConfig;
30 | config.reporters.push('saucelabs');
31 | config.transports = [ 'xhr-polling' ];
32 |
33 | config.sauceLabs = {
34 | username: auth.SAUCE_USERNAME
35 | , accessKey: auth.SAUCE_ACCESS_KEY
36 | , startConnect: true
37 | , tags: tags
38 | , testName: 'ChaiJS'
39 | , tunnelIdentifier: tunnel
40 | };
41 | };
42 |
--------------------------------------------------------------------------------
/bower_components/chai/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Jake Luer ",
3 | "name": "chai",
4 | "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
5 | "keywords": [ "test", "assertion", "assert", "testing", "chai" ],
6 | "homepage": "http://chaijs.com",
7 | "license": "MIT",
8 | "contributors": [
9 | "Jake Luer ",
10 | "Domenic Denicola (http://domenicdenicola.com)",
11 | "Veselin Todorov ",
12 | "John Firebaugh "
13 | ],
14 | "version": "1.8.1",
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/chaijs/chai"
18 | },
19 | "bugs": {
20 | "url": "https://github.com/chaijs/chai/issues"
21 | },
22 | "main": "./index",
23 | "scripts": {
24 | "test": "make test"
25 | },
26 | "engines": {
27 | "node": ">= 0.4.0"
28 | },
29 | "dependencies": {
30 | "assertion-error": "1.0.0"
31 | , "deep-eql": "0.1.3"
32 | },
33 | "devDependencies": {
34 | "component": "*"
35 | , "coveralls": "2.0.16"
36 | , "jscoverage": "0.3.7"
37 | , "karma": "canary"
38 | , "karma-mocha": "*"
39 | , "karma-sauce-launcher": "git://github.com/embarkmobile/karma-sauce-launcher.git#feature-passfail"
40 | , "mocha": "1.8.2"
41 | , "mocha-lcov-reporter": "0.0.1"
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "json-typescript-mapper",
3 | "version": "1.1.3",
4 | "typescript": {
5 | "definition": "index.d.ts"
6 | },
7 | "dependencies": {
8 | "reflect-metadata": "^0.1.3"
9 | },
10 | "devDependencies": {
11 | "chai": "~1.8.0",
12 | "mocha": "2.0.1"
13 | },
14 | "scripts": {
15 | "test": "mocha ./spec/*.js",
16 | "typings:generate": "tsc --declaration"
17 | },
18 | "description": "For single page application, data sources are obtained from API server. Instead of directly using api data, we \r definitely require an adapter layer to transform data as needed. Furthermore, \r the adapter inverse the the data dependency from API server(API Server is considered uncontrollable and \r highly unreliable as data structure may be edit by backend coder for some specific purposes)to our adapter \r which becomes reliable. Thus, this library is created as the adapter make use of es7 reflect decorator.",
19 | "main": "index.js",
20 | "repository": {
21 | "type": "git",
22 | "url": "git+https://github.com/jf3096/json-typescript-mapper.git"
23 | },
24 | "keywords": [
25 | "json-mapper",
26 | "typescript-json",
27 | "json-adapter",
28 | "json-transformer",
29 | "api-mapper",
30 | "api-adapter"
31 | ],
32 | "author": "Ailun She",
33 | "license": "ISC",
34 | "bugs": {
35 | "url": "https://github.com/jf3096/json-typescript-mapper/issues"
36 | },
37 | "homepage": "https://github.com/jf3096/json-typescript-mapper#readme"
38 | }
39 |
--------------------------------------------------------------------------------
/bower_components/chai/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chai"
3 | , "repo": "chaijs/chai"
4 | , "version": "1.8.1"
5 | , "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic."
6 | , "license": "MIT"
7 | , "keywords": [
8 | "test"
9 | , "assertion"
10 | , "assert"
11 | , "testing"
12 | , "chai"
13 | ]
14 | , "main": "index.js"
15 | , "scripts": [
16 | "index.js"
17 | , "lib/chai.js"
18 | , "lib/chai/assertion.js"
19 | , "lib/chai/core/assertions.js"
20 | , "lib/chai/interface/assert.js"
21 | , "lib/chai/interface/expect.js"
22 | , "lib/chai/interface/should.js"
23 | , "lib/chai/utils/addChainableMethod.js"
24 | , "lib/chai/utils/addMethod.js"
25 | , "lib/chai/utils/addProperty.js"
26 | , "lib/chai/utils/flag.js"
27 | , "lib/chai/utils/getActual.js"
28 | , "lib/chai/utils/getEnumerableProperties.js"
29 | , "lib/chai/utils/getMessage.js"
30 | , "lib/chai/utils/getName.js"
31 | , "lib/chai/utils/getPathValue.js"
32 | , "lib/chai/utils/getProperties.js"
33 | , "lib/chai/utils/index.js"
34 | , "lib/chai/utils/inspect.js"
35 | , "lib/chai/utils/objDisplay.js"
36 | , "lib/chai/utils/overwriteMethod.js"
37 | , "lib/chai/utils/overwriteProperty.js"
38 | , "lib/chai/utils/test.js"
39 | , "lib/chai/utils/transferFlags.js"
40 | , "lib/chai/utils/type.js"
41 | ]
42 | , "dependencies": {
43 | "chaijs/assertion-error": "1.0.0"
44 | , "chaijs/deep-eql": "0.1.3"
45 | }
46 | , "development": {}
47 | }
48 |
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | import 'reflect-metadata';
2 | /**
3 | * provide interface to indicate the object is allowed to be traversed
4 | *
5 | * @interface
6 | */
7 | export interface IGenericObject {
8 | [key: string]: any;
9 | }
10 | /**
11 | * When custom mapping of a property is required.
12 | *
13 | * @interface
14 | */
15 | export interface ICustomConverter {
16 | fromJson(data: any): any;
17 | toJson(data: any): any;
18 | }
19 | /**
20 | * IDecoratorMetaData
21 | * DecoratorConstraint
22 | *
23 | * @interface
24 | * @property {ICustomConverter} customConverter, will be used for mapping the property, if specified
25 | * @property {boolean} excludeToJson, will exclude the property for serialization, if true
26 | */
27 | export interface IDecoratorMetaData {
28 | name?: string;
29 | clazz?: {
30 | new (): T;
31 | };
32 | customConverter?: ICustomConverter;
33 | excludeToJson?: boolean;
34 | }
35 | /**
36 | * JsonProperty
37 | *
38 | * @function
39 | * @property {IDecoratorMetaData|string} metadata, encapsulate it to DecoratorMetaData for standard use
40 | * @return {(target:Object, targetKey:string | symbol)=> void} decorator function
41 | */
42 | export declare function JsonProperty(metadata?: IDecoratorMetaData | string): (target: Object, targetKey: string | symbol) => void;
43 | /**
44 | * deserialize
45 | *
46 | * @function
47 | * @param {{new():T}} clazz, class type which is going to initialize and hold a mapping json
48 | * @param {Object} json, input json object which to be mapped
49 | *
50 | * @return {T} return mapped object
51 | */
52 | export declare function deserialize(Clazz: {
53 | new (): T;
54 | }, json: IGenericObject): T;
55 | /**
56 | * Serialize: Creates a ready-for-json-serialization object from the provided model instance.
57 | * Only @JsonProperty decorated properties in the model instance are processed.
58 | *
59 | * @param instance an instance of a model class
60 | * @returns {any} an object ready to be serialized to JSON
61 | */
62 | export declare function serialize(instance: any): any;
63 |
--------------------------------------------------------------------------------
/bower_components/chai/sauce.browsers.js:
--------------------------------------------------------------------------------
1 |
2 | /*!
3 | * Chrome
4 | */
5 |
6 | exports['SL_Chrome'] = {
7 | base: 'SauceLabs'
8 | , browserName: 'chrome'
9 | };
10 |
11 | /*!
12 | * Firefox
13 | */
14 |
15 | /*!
16 | * TODO: Karma doesn't seem to like this, though sauce boots its up
17 | *
18 |
19 | exports['SL_Firefox_23'] = {
20 | base: 'SauceLabs'
21 | , browserName: 'firefox'
22 | , platform: 'Windows XP'
23 | , version: '23'
24 | };
25 |
26 | */
27 |
28 | exports['SL_Firefox_22'] = {
29 | base: 'SauceLabs'
30 | , browserName: 'firefox'
31 | , platform: 'Windows 7'
32 | , version: '22'
33 | };
34 |
35 | /*!
36 | * Opera
37 | */
38 |
39 | exports['SL_Opera_12'] = {
40 | base: 'SauceLabs'
41 | , browserName: 'opera'
42 | , platform: 'Windows 7'
43 | , version: '12'
44 | };
45 |
46 | exports['SL_Opera_11'] = {
47 | base: 'SauceLabs'
48 | , browserName: 'opera'
49 | , platform: 'Windows 7'
50 | , version: '11'
51 | };
52 |
53 | /*!
54 | * Internet Explorer
55 | */
56 |
57 | exports['SL_IE_10'] = {
58 | base: 'SauceLabs'
59 | , browserName: 'internet explorer'
60 | , platform: 'Windows 2012'
61 | , version: '10'
62 | };
63 |
64 | /*!
65 | * Safari
66 | */
67 |
68 | exports['SL_Safari_6'] = {
69 | base: 'SauceLabs'
70 | , browserName: 'safari'
71 | , platform: 'Mac 10.8'
72 | , version: '6'
73 | };
74 |
75 | exports['SL_Safari_5'] = {
76 | base: 'SauceLabs'
77 | , browserName: 'safari'
78 | , platform: 'Mac 10.6'
79 | , version: '5'
80 | };
81 |
82 | /*!
83 | * iPhone
84 | */
85 |
86 | /*!
87 | * TODO: These take forever to boot or shut down. Causes timeout.
88 | *
89 |
90 | exports['SL_iPhone_6'] = {
91 | base: 'SauceLabs'
92 | , browserName: 'iphone'
93 | , platform: 'Mac 10.8'
94 | , version: '6'
95 | };
96 |
97 | exports['SL_iPhone_5-1'] = {
98 | base: 'SauceLabs'
99 | , browserName: 'iphone'
100 | , platform: 'Mac 10.8'
101 | , version: '5.1'
102 | };
103 |
104 | exports['SL_iPhone_5'] = {
105 | base: 'SauceLabs'
106 | , browserName: 'iphone'
107 | , platform: 'Mac 10.6'
108 | , version: '5'
109 | };
110 |
111 | */
112 |
113 | /*!
114 | * Android
115 | */
116 |
117 | /*!
118 | * TODO: fails because of error serialization
119 | *
120 |
121 | exports['SL_Android_4'] = {
122 | base: 'SauceLabs'
123 | , browserName: 'android'
124 | , platform: 'Linux'
125 | , version: '4'
126 | };
127 |
128 | */
129 |
--------------------------------------------------------------------------------
/bower_components/chai/README.md:
--------------------------------------------------------------------------------
1 | [](http://chaijs.com)
2 |
3 | Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that
4 | can be delightfully paired with any javascript testing framework.
5 |
6 | For more information or to download plugins, view the [documentation](http://chaijs.com).
7 |
8 | [](https://travis-ci.org/chaijs/chai) [](https://coveralls.io/r/chaijs/chai?branch=master)
9 |
10 | [](https://saucelabs.com/u/chaijs)
11 |
12 | ### Related Projects
13 |
14 | - [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing.
15 | - [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser.
16 |
17 | ### Contributors
18 |
19 | project : chai
20 | repo age : 1 year, 9 months
21 | active : 139 days
22 | commits : 693
23 | files : 54
24 | authors :
25 | 518 Jake Luer 74.7%
26 | 66 Veselin Todorov 9.5%
27 | 43 Domenic Denicola 6.2%
28 | 6 Ruben Verborgh 0.9%
29 | 5 George Kats 0.7%
30 | 5 Jo Liss 0.7%
31 | 5 Juliusz Gonera 0.7%
32 | 5 Scott Nonnenberg 0.7%
33 | 4 John Firebaugh 0.6%
34 | 4 Nick Heiner 0.6%
35 | 4 josher19 0.6%
36 | 3 Jeff Barczewski 0.4%
37 | 3 Ryunosuke SATO 0.4%
38 | 2 Bartvds 0.3%
39 | 2 Edwin Shao 0.3%
40 | 2 Jakub Nešetřil 0.3%
41 | 2 Teddy Cross 0.3%
42 | 1 Anand Patil 0.1%
43 | 1 Benjamin Horsleben 0.1%
44 | 1 Brandon Payton 0.1%
45 | 1 Chris Connelly 0.1%
46 | 1 Chun-Yi 0.1%
47 | 1 DD 0.1%
48 | 1 Jeff Welch 0.1%
49 | 1 Kilian Ciuffolo 0.1%
50 | 1 Niklas Närhinen 0.1%
51 | 1 Paul Miller 0.1%
52 | 1 Sasha Koss 0.1%
53 | 1 Victor Costan 0.1%
54 | 1 Vinay Pulim 0.1%
55 | 1 piecioshka 0.1%
56 |
57 | ## License
58 |
59 | (The MIT License)
60 |
61 | Copyright (c) 2011-2013 Jake Luer
62 |
63 | Permission is hereby granted, free of charge, to any person obtaining a copy
64 | of this software and associated documentation files (the "Software"), to deal
65 | in the Software without restriction, including without limitation the rights
66 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
67 | copies of the Software, and to permit persons to whom the Software is
68 | furnished to do so, subject to the following conditions:
69 |
70 | The above copyright notice and this permission notice shall be included in
71 | all copies or substantial portions of the Software.
72 |
73 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
75 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
77 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
78 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
79 | THE SOFTWARE.
80 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # json-typescript-mapper
2 |
3 | ## Introduction
4 |
5 | For single page application, data sources are obtained from API server. Instead of directly using api data, we
6 | definitely require an adapter layer to transform data as needed. Furthermore,
7 | the adapter inverse the the data dependency from API server(API Server is considered uncontrollable and
8 | highly unreliable as data structure may be edit by backend coder for some specific purposes)to our adapter
9 | which becomes reliable. Thus, this library is created as the adapter.
10 |
11 | ### Get Started
12 | ```bash
13 | npm install json-typescript-mapper --save
14 | ```
15 | ## Environment
16 | * NodeJS
17 | * Browser
18 |
19 | ## Language
20 | * Typescript
21 |
22 | ### Typescript
23 |
24 | ```bash
25 | import {deserialize} from 'json-typescript-mapper';
26 |
27 | deserialize(, );
28 | serialize(