This commit is contained in:
szabomarton
2025-01-28 11:38:27 +01:00
parent 9c5ca86086
commit 7f4a15b9c3
36841 changed files with 4032468 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
{
"presets": [ "es2015", "stage-0" ],
}

View File

@@ -0,0 +1,9 @@
{
"extends": "airbnb-base",
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true,
}
}

View File

@@ -0,0 +1,29 @@
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.DS_Store

View File

@@ -0,0 +1,22 @@
language: node_js
node_js:
- 6.2.0
- 5.3.0
- 4.0
compiler: clang-3.6
env:
- CXX=clang-3.6
addons:
apt:
sources:
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
packages:
- clang-3.6
- g++-4.8
after_success: npm run coveralls

22
25_01_07/mai/node_modules/identity-obj-proxy/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Keyan Zhang
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.

17
25_01_07/mai/node_modules/identity-obj-proxy/README.md generated vendored Normal file
View File

@@ -0,0 +1,17 @@
# identity-obj-proxy [![Build Status](https://img.shields.io/travis/keyanzhang/identity-obj-proxy.svg?style=flat-square)](https://travis-ci.org/keyanzhang/identity-obj-proxy) [![npm version](https://img.shields.io/npm/v/identity-obj-proxy.svg?style=flat-square)](https://www.npmjs.com/package/identity-obj-proxy) [![test coverage](https://img.shields.io/coveralls/keyanzhang/identity-obj-proxy/master.svg?style=flat-square)](https://coveralls.io/github/keyanzhang/identity-obj-proxy?branch=master)
An identity object using ES6 proxies. Useful for testing trivial webpack imports. For instance, you can tell Jest to mock this object as imported [CSS modules](https://github.com/css-modules/css-modules); then all your `className` lookups on the imported `styles` object will be returned as-is.
```
npm install identity-obj-proxy
```
## Requirement
No flag is required for Node.js `v6.*`; use `node --harmony_proxies` flag for `v5.*` and `v4.*`.
## Example
``` javascript
import idObj from 'identity-obj-proxy';
console.log(idObj.foo); // 'foo'
console.log(idObj.bar); // 'bar'
console.log(idObj[1]); // '1'
```

View File

@@ -0,0 +1,53 @@
{
"name": "identity-obj-proxy",
"version": "3.0.0",
"description": "an identity object using ES6 proxies",
"main": "src/index.js",
"scripts": {
"lint": "eslint src",
"test": "node --harmony_proxies node_modules/.bin/jest",
"coverage": "node --harmony_proxies node_modules/.bin/jest --coverage",
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls",
"prepublish": "npm run lint && npm run test"
},
"engines": {
"node": ">=4"
},
"repository": {
"type": "git",
"url": "git+https://github.com/keyanzhang/identity-obj-proxy.git"
},
"keywords": [
"proxy",
"proxies",
"identity",
"jest",
"mock"
],
"author": "Keyan Zhang <root@keyanzhang.com> (http://keya.nz)",
"license": "MIT",
"bugs": {
"url": "https://github.com/keyanzhang/identity-obj-proxy/issues"
},
"homepage": "https://github.com/keyanzhang/identity-obj-proxy#readme",
"dependencies": {
"harmony-reflect": "^1.4.6"
},
"devDependencies": {
"babel-core": "^6.11.4",
"babel-jest": "^14.1.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"coveralls": "^2.11.12",
"eslint": "^3.2.2",
"eslint-config-airbnb-base": "^5.0.1",
"eslint-plugin-import": "^1.12.0",
"jest-cli": "^14.1.0"
},
"jest": {
"automock": false,
"testPathDirs": [
"<rootDir>/src"
]
}
}

View File

@@ -0,0 +1,13 @@
import idObj from '../test-redirections/idObjES6Export';
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
import idObj from '../test-redirections/idObjES6ImportExport';
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
import idObj from '../test-redirections/idObjES6Import';
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
import idObj from '..';
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
const idObj = require('..');
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
const idObj = require('../test-redirections/idObjES6Export').default;
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
const idObj = require('../test-redirections/idObjES6ImportExport').default;
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
const idObj = require('../test-redirections/idObjES6Import');
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,13 @@
const idObj = require('..');
describe('idObj', () => {
it('should return the key as a string', () => {
expect(idObj.foo).toBe('foo');
});
it('should support dot notation', () => {
expect(idObj.bar).toBe('bar');
});
it('should support bracket notation', () => {
expect(idObj[1]).toBe('1');
});
});

View File

@@ -0,0 +1,26 @@
/* eslint-disable no-var, comma-dangle */
var Reflect; // eslint-disable-line no-unused-vars
var idObj;
function checkIsNodeV6OrAbove() {
if (typeof process === 'undefined') {
return false;
}
return parseInt(process.versions.node.split('.')[0], 10) >= 6;
}
if (!checkIsNodeV6OrAbove()) {
Reflect = require('harmony-reflect'); // eslint-disable-line global-require
}
idObj = new Proxy({}, {
get: function getter(target, key) {
if (key === '__esModule') {
return false;
}
return key;
}
});
module.exports = idObj;

View File

@@ -0,0 +1,3 @@
const idObj = require('..');
export default idObj;

View File

@@ -0,0 +1,3 @@
import idObj from '..';
module.exports = idObj;

View File

@@ -0,0 +1,3 @@
import idObj from '..';
export default idObj;