Clean up the oopsie. Rebuild the blank exercises.

This commit is contained in:
Michael Frank
2021-05-09 00:39:21 +12:00
parent b984cb4c6f
commit d28d80c46f
1565 changed files with 27186 additions and 199003 deletions
Generated Vendored
-14
View File
@@ -1,14 +0,0 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true,
"browser": true
}
-3
View File
@@ -1,3 +0,0 @@
/node_modules/
*.log
*~
-18
View File
@@ -1,18 +0,0 @@
# has
> Object.prototype.hasOwnProperty.call shortcut
## Installation
```sh
npm install --save has
```
## Usage
```js
var has = require('has');
has({}, 'hasOwnProperty'); // false
has(Object.prototype, 'hasOwnProperty'); // true
```
+29 -18
View File
@@ -1,27 +1,27 @@
{
"_from": "has@^1.0.1",
"_id": "has@1.0.1",
"_from": "has@^1.0.3",
"_id": "has@1.0.3",
"_inBundle": false,
"_integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
"_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"_location": "/has",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "has@^1.0.1",
"raw": "has@^1.0.3",
"name": "has",
"escapedName": "has",
"rawSpec": "^1.0.1",
"rawSpec": "^1.0.3",
"saveSpec": null,
"fetchSpec": "^1.0.1"
"fetchSpec": "^1.0.3"
},
"_requiredBy": [
"/eslint-plugin-import"
"/is-core-module"
],
"_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
"_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28",
"_spec": "has@^1.0.1",
"_where": "/Users/cloyd/coderrr/odin/javascript-exercises/node_modules/eslint-plugin-import",
"_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"_shasum": "722d7cbfc1f6aa8241f16dd814e011e1f41e8796",
"_spec": "has@^1.0.3",
"_where": "/home/michael/projects/javascript-exercises/node_modules/is-core-module",
"author": {
"name": "Thiago de Arruda",
"email": "tpadilha84@gmail.com"
@@ -30,33 +30,44 @@
"url": "https://github.com/tarruda/has/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
}
],
"dependencies": {
"function-bind": "^1.0.2"
"function-bind": "^1.1.1"
},
"deprecated": false,
"description": "Object.prototype.hasOwnProperty.call shortcut",
"devDependencies": {
"chai": "~1.7.2",
"mocha": "^1.21.4"
"@ljharb/eslint-config": "^12.2.1",
"eslint": "^4.19.1",
"tape": "^4.9.0"
},
"engines": {
"node": ">= 0.8.0"
"node": ">= 0.4.0"
},
"homepage": "https://github.com/tarruda/has",
"license": "MIT",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT"
}
],
"main": "./src/index",
"main": "./src",
"name": "has",
"repository": {
"type": "git",
"url": "git://github.com/tarruda/has.git"
},
"scripts": {
"test": "node_modules/mocha/bin/mocha"
"lint": "eslint .",
"pretest": "npm run lint",
"test": "tape test"
},
"version": "1.0.1"
"version": "1.0.3"
}
+2
View File
@@ -1,3 +1,5 @@
'use strict';
var bind = require('function-bind');
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
-7
View File
@@ -1,7 +0,0 @@
{
"globals": {
"expect": false,
"run": false
},
"expr": true
}
+7 -7
View File
@@ -1,10 +1,10 @@
global.expect = require('chai').expect;
var has = require('../src');
'use strict';
var test = require('tape');
var has = require('../');
describe('has', function() {
it('works!', function() {
expect(has({}, 'hasOwnProperty')).to.be.false;
expect(has(Object.prototype, 'hasOwnProperty')).to.be.true;
});
test('has', function (t) {
t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"');
t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"');
t.end();
});