Commit 1f3e68db authored by Adam Procter's avatar Adam Procter

Basic routing & user

Few things don't work as expected but you can type in a email and be blocked or allowed in, currently only using 1 account
parent 2a76c3bb
Pipeline #58 failed with stage
in 19 seconds
{"remainingRequest":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/babel-loader/lib/index.js!/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/eslint-loader/index.js??ref--13-0!/Users/adamprocter/Documents/GitKraken/nodenoggin/src/main.js","dependencies":[{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/src/main.js","mtime":1534161785761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/babel-loader/lib/index.js","mtime":1534157848390},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/eslint-loader/index.js","mtime":1534157852415}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.iterator\";\nimport \"core-js/modules/es6.promise\";\nimport \"core-js/modules/es7.promise.finally\";\nimport Vue from 'vue';\nimport App from './App.vue';\nimport router from './router';\nVue.config.productionTip = false;\nnew Vue({\n router: router,\n render: function render(h) {\n return h(App);\n }\n}).$mount('#app');\n\nmounted: {\n require('@/assets/js/test'); // require('@/assets/js/draggy')\n // require('@/assets/js/connectable')\n\n}",{"version":3,"sources":["src/main.js"],"names":["Vue","App","router","config","productionTip","render","h","$mount","mounted","require"],"mappings":";;;AAAA,OAAOA,GAAP,MAAgB,KAAhB;AACA,OAAOC,GAAP,MAAgB,WAAhB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEAF,IAAIG,MAAJ,CAAWC,aAAX,GAA2B,KAA3B;AAEA,IAAIJ,GAAJ,CAAQ;AACNE,gBADM;AAENG,UAAQ;AAAA,WAAKC,EAAEL,GAAF,CAAL;AAAA;AAFF,CAAR,EAGGM,MAHH,CAGU,MAHV;;AAKAC,SAAQ;AACRC,UAAQ,kBAAR,EADQ,CAER;AACA;;AACC","sourceRoot":"/Users/adamprocter/Documents/GitKraken/nodenoggin","sourcesContent":["import Vue from 'vue'\nimport App from './App.vue'\nimport router from './router'\n\nVue.config.productionTip = false\n\nnew Vue({\n router,\n render: h => h(App)\n}).$mount('#app')\n\nmounted:{\nrequire('@/assets/js/test')\n// require('@/assets/js/draggy')\n// require('@/assets/js/connectable')\n}"]}]}
\ No newline at end of file
{"remainingRequest":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue?vue&type=template&id=7ba5bd90&","dependencies":[{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue","mtime":1534164062663},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/loaders/templateLoader.js","mtime":1534157857478},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js","mtime":1534157857478}],"contextDependencies":[],"result":["\n<div id=\"app\">\n <div id=\"nav\">\n <router-link to=\"/\">Home</router-link> |\n <router-link to=\"/about\">About</router-link>\n </div>\n <router-view/>\n\n </div>\n",null]}
\ No newline at end of file
{"remainingRequest":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue?vue&type=template&id=7ba5bd90&","dependencies":[{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue","mtime":1534164062663},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/loaders/templateLoader.js","mtime":1534157857478},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js","mtime":1534157857478}],"contextDependencies":[],"result":["var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"app\" } },\n [\n _c(\n \"div\",\n { attrs: { id: \"nav\" } },\n [\n _c(\"router-link\", { attrs: { to: \"/\" } }, [_vm._v(\"Home\")]),\n _vm._v(\" |\\n \"),\n _c(\"router-link\", { attrs: { to: \"/about\" } }, [_vm._v(\"About\")])\n ],\n 1\n ),\n _c(\"router-view\")\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"]}
\ No newline at end of file
{"remainingRequest":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/eslint-loader/index.js??ref--13-0!/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue","dependencies":[{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/src/App.vue","mtime":1534164062663},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/cache-loader/dist/cjs.js","mtime":1534157856761},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-loader/lib/index.js","mtime":1534157857478},{"path":"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/eslint-loader/index.js","mtime":1534157852415}],"contextDependencies":[],"result":["import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=7ba5bd90&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/adamprocter/Documents/GitKraken/nodenoggin/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!module.hot.data) {\n api.createRecord('7ba5bd90', component.options)\n } else {\n api.reload('7ba5bd90', component.options)\n }\n module.hot.accept(\"./App.vue?vue&type=template&id=7ba5bd90&\", function () {\n api.rerender('7ba5bd90', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/App.vue\"\nexport default component.exports"]}
\ No newline at end of file
This diff is collapsed.
......@@ -9,6 +9,8 @@
"@vue/cli-plugin-babel@^3.0.0",
"@vue/cli-plugin-eslint@^3.0.0",
"@vue/cli-service@^3.0.0",
"svg.connectable.js@^2.0.1",
"svg.draggy.js@^1.1.1",
"svg.js@^2.6.5",
"vue-router@^3.0.1",
"vue-template-compiler@^2.5.17",
......@@ -378,6 +380,7 @@
"deep-is@~0.1.3": "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34",
"deepmerge@^1.5.2": "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753",
"defaults@^1.0.3": "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d",
"deffy@^2.0.0": "https://registry.yarnpkg.com/deffy/-/deffy-2.2.2.tgz#088f40913cb47078653fa6f697c206e03471d523",
"define-properties@^1.1.2": "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94",
"define-property@^0.2.5": "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116",
"define-property@^1.0.0": "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
......@@ -525,6 +528,7 @@
"function-bind@^1.0.2": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d",
"function-bind@^1.1.0": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d",
"function-bind@^1.1.1": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d",
"function.name@^1.0.3": "https://registry.yarnpkg.com/function.name/-/function.name-1.0.10.tgz#ed00c828d98ff9a80186926fd439bdd7c16d4f0d",
"functional-red-black-tree@^1.0.1": "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327",
"gauge@~2.7.3": "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7",
"get-caller-file@^1.0.1": "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a",
......@@ -594,6 +598,7 @@
"iconv-lite@^0.4.4": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63",
"icss-replace-symbols@^1.1.0": "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded",
"icss-utils@^2.1.0": "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962",
"idy@^1.0.0": "https://registry.yarnpkg.com/idy/-/idy-1.2.8.tgz#4138aed2bcaaf7923487a44d77fbbd6095d30cde",
"ieee754@^1.1.11": "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b",
"ieee754@^1.1.4": "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b",
"iferr@^0.1.5": "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501",
......@@ -690,6 +695,7 @@
"isobject@^3.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
"isobject@^3.0.1": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
"isstream@~0.1.2": "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a",
"iterate-object@^1.1.0": "https://registry.yarnpkg.com/iterate-object/-/iterate-object-1.3.2.tgz#24ec15affa5d0039e8839695a21c2cae1f45b66b",
"javascript-stringify@^1.6.0": "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-1.6.0.tgz#142d111f3a6e3dae8f4a9afd77d45855b5a9cce3",
"joi@^13.0.0": "https://registry.yarnpkg.com/joi/-/joi-13.6.0.tgz#877d820e3ad688a49c32421ffefc746bfbe2d0a0",
"js-message@1.0.5": "https://registry.yarnpkg.com/js-message/-/js-message-1.0.5.tgz#2300d24b1af08e89dd095bc1a4c9c9cfcb892d15",
......@@ -837,6 +843,7 @@
"node-libs-browser@^2.0.0": "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df",
"node-pre-gyp@^0.10.0": "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc",
"node-releases@^1.0.0-alpha.10": "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.10.tgz#61c8d5f9b5b2e05d84eba941d05b6f5202f68a2a",
"noop6@^1.0.1": "https://registry.yarnpkg.com/noop6/-/noop6-1.0.7.tgz#96767bf2058ba59ca8cb91559347ddc80239fa8e",
"nopt@^4.0.1": "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d",
"normalize-package-data@^2.3.2": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f",
"normalize-package-data@^2.3.4": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f",
......@@ -1110,6 +1117,7 @@
"set-blocking@^2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7",
"set-blocking@~2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7",
"set-immediate-shim@^1.0.1": "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61",
"set-or-get@^1.0.0": "https://registry.yarnpkg.com/set-or-get/-/set-or-get-1.2.8.tgz#289322c65d3161baf72b57704ee7684a934d2ef4",
"set-value@^0.4.3": "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1",
"set-value@^2.0.0": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274",
"setimmediate@^1.0.4": "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285",
......@@ -1186,6 +1194,8 @@
"supports-color@^5.1.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54",
"supports-color@^5.3.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54",
"supports-color@^5.4.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54",
"svg.connectable.js@^2.0.1": "https://registry.yarnpkg.com/svg.connectable.js/-/svg.connectable.js-2.0.1.tgz#d3025d0368e488dad9bd488bb80f5810f60e414f",
"svg.draggy.js@^1.1.1": "https://registry.yarnpkg.com/svg.draggy.js/-/svg.draggy.js-1.1.1.tgz#c4e2d1702735bf5ec2d504ac44728a8a62a38449",
"svg.js@^2.6.5": "https://registry.yarnpkg.com/svg.js/-/svg.js-2.6.5.tgz#5b93d0c8c11e2b70812ef9de1562aa91975cc3b6",
"svgo@^1.0.0": "https://registry.yarnpkg.com/svgo/-/svgo-1.0.5.tgz#7040364c062a0538abacff4401cea6a26a7a389a",
"table@4.0.2": "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36",
......@@ -1222,6 +1232,7 @@
"type-is@~1.6.15": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194",
"type-is@~1.6.16": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194",
"typedarray@^0.0.6": "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777",
"typpy@^2.0.0": "https://registry.yarnpkg.com/typpy/-/typpy-2.3.10.tgz#63a39e4171cbbb4cdefb590009228a3de9a22b2f",
"uglify-es@^3.3.4": "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677",
"uglify-js@3.4.x": "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.7.tgz#4df6b92e54789aa921a254cb1e33704d6ec12b89",
"uglifyjs-webpack-plugin@^1.2.4": "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz#57638dd99c853a1ebfe9d97b42160a8a507f9d00",
......
The MIT License (MIT)
Copyright (c) 2015-16 Ionică Bizău <bizauionica@gmail.com> (http://ionicabizau.net)
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.
[![deffy](http://i.imgur.com/k1hlQxA.png)](#)
# deffy [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/deffy.svg)](https://www.npmjs.com/package/deffy) [![Downloads](https://img.shields.io/npm/dt/deffy.svg)](https://www.npmjs.com/package/deffy) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
> Small and fast library to set default values.
## :cloud: Installation
```sh
$ npm i --save deffy
```
## :clipboard: Example
```js
// Dependencies
var Deffy = require("deffy");
console.log(Deffy(undefined, "Hello World"));
// => "Hello World"
console.log(Deffy("Hello World", 42));
// => 42
console.log(Deffy("Hello", "World"));
// => "World"
console.log(Deffy("", "World", true));
// => "World"
console.log(Deffy("", "World"));
// => ""
console.log(Deffy("foo", function (input) {
return input === "foo" ? "bar" : "foo";
}));
// => "bar"
```
## :memo: Documentation
### `Deffy(input, def, options)`
Computes a final value by providing the input and default values.
#### Params
- **Anything** `input`: The input value.
- **Anything|Function** `def`: The default value or a function getting the input value as first argument.
- **Object|Boolean** `options`: The `empty` value or an object containing the following fields:
- `empty` (Boolean): Handles the input value as empty field (`input || default`). Default is `false`.
#### Return
- **Anything** The computed value.
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
- [`ascii-heart`](https://github.com/nuvipannu/ascii-heart#readme) (by Nuvi Pannu)—Create ASCII hearts using Node.js.
- [`asciify-pixel`](https://github.com/IonicaBizau/asciify-pixel#readme)—Asciifies a pixel object.
- [`blah`](https://github.com/IonicaBizau/blah)—A command line tool to optimize the repetitive actions.
- [`bug-killer`](https://github.com/IonicaBizau/node-bug-killer)—Simple way to log messages in stdout or other stream.
- [`cli-box`](https://github.com/IonicaBizau/node-cli-box)—A library to generate ASCII boxes via NodeJS
- [`cli-gh-cal`](https://github.com/IonicaBizau/cli-gh-cal)—GitHub like calendar graphs in command line.
- [`emoji-logger`](https://github.com/IonicaBizau/emoji-logger#readme)—Logging library based on flat colors and Emoji.
- [`engine-builder`](https://github.com/IonicaBizau/engine-parser) (by jillix)—Engine composition parser.
- [`engine-flow-types`](https://github.com/jillix/engine-flow-types#readme) (by jillix)—Low level library providing Engine flow types.
- [`engine-parser`](https://github.com/IonicaBizau/engine-parser) (by jillix)—Engine composition parser.
- [`engine-tools`](https://github.com/jillix/engine-tools) (by jillix)—Engine Tools library and CLI app.
- [`enny`](https://github.com/IonicaBizau/enny) (by jillix)—Generate Engine compositions from human-readable inputs.
- [`flow-api`](https://github.com/jillix/flow-api) (by jillix)—The flow api library and CLI app.
- [`gh-notifier`](https://bitbucket.org/IonicaBizau/gh-notifier#readme)—Receive desktop notifications from your GitHub dashboard.
- [`ghosty`](https://github.com/IonicaBizau/ghosty#readme)—A wrapper around PhantomJS, downloading the Phantom binary.
- [`git-package-json`](https://github.com/IonicaBizau/git-package-json#readme)—Get the package.json contents from git repositories.
- [`git-stats`](https://github.com/IonicaBizau/git-stats)—Local git statistics including GitHub-like contributions calendars.
- [`gpm`](https://github.com/IonicaBizau/gpm)—npm + git = gpm - Install NPM packages and dependencies from git repositories.
- [`love-you`](https://github.com/IonicaBizau/love-you#readme)—"I love you" in different languages.
- [`one-by-one`](https://github.com/IonicaBizau/one-by-one)—Run async tasks one by one.
- [`pixel-class`](https://github.com/IonicaBizau/pixel-class#readme)—A tiny class for pixel manipulation.
- [`same-time`](https://github.com/IonicaBizau/same-time.js)—Call functions in parallel and store the results.
- [`set-or-get`](https://github.com/IonicaBizau/set-or-get.js)—Sets or gets an object field value.
- [`ssh-remote`](https://github.com/IonicaBizau/ssh-remote)—Automagically switch on the SSH remote url in a Git repository.
- [`svg.connectable.js`](https://github.com/jillix/svg.connectable.js) (by jillix)—A JavaScript library for connecting SVG things.
- [`tilda`](https://github.com/IonicaBizau/tilda)—Tiny module for building command line tools.
- [`ul`](https://github.com/IonicaBizau/node-ul)—A minimalist utility library.
- [`web-term`](https://github.com/IonicaBizau/web-term)—A full screen terminal in your browser.
## :scroll: License
[MIT][license] © [Ionică Bizău][website]
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
[donate-now]: http://i.imgur.com/6cMbHOC.png
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2015#license-mit
[website]: http://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
// Dependencies
var Typpy = require("typpy");
/**
* Deffy
* Computes a final value by providing the input and default values.
*
* @name Deffy
* @function
* @param {Anything} input The input value.
* @param {Anything|Function} def The default value or a function getting the
* input value as first argument.
* @param {Object|Boolean} options The `empty` value or an object containing
* the following fields:
*
* - `empty` (Boolean): Handles the input value as empty field (`input || default`). Default is `false`.
*
* @return {Anything} The computed value.
*/
function Deffy(input, def, options) {
// Default is a function
if (typeof def === "function") {
return def(input);
}
options = Typpy(options) === "boolean" ? {
empty: options
} : {
empty: false
};
// Handle empty
if (options.empty) {
return input || def;
}
// Return input
if (Typpy(input) === Typpy(def)) {
return input;
}
// Return the default
return def;
}
module.exports = Deffy;
{
"name": "deffy",
"version": "2.2.2",
"description": "Small and fast library to set default values.",
"main": "lib/index.js",
"directories": {
"example": "example",
"test": "test"
},
"dependencies": {
"typpy": "^2.0.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com:IonicaBizau/deffy.js.git"
},
"keywords": [
"default",
"values",
"deffy"
],
"author": "Ionică Bizău <bizauionica@gmail.com> (http://ionicabizau.net)",
"license": "MIT",
"bugs": {
"url": "https://github.com/IonicaBizau/deffy.js/issues"
},
"blah": {
"h_img": "http://i.imgur.com/k1hlQxA.png"
},
"homepage": "https://github.com/IonicaBizau/deffy.js",
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"resources/",
"menu/",
"cli.js",
"index.js"
]
}
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2016-17 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
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.
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
# function.name
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/function.name.svg)](https://www.npmjs.com/package/function.name) [![Downloads](https://img.shields.io/npm/dt/function.name.svg)](https://www.npmjs.com/package/function.name)
> Function name shim (especially for supporting function names in Internet Explorer).
If the name field is not accessible (usually this happens on Internet Explorer), it will be defined.
## :cloud: Installation
```sh
# Using npm
npm install --save function.name
# Using yarn
yarn add function.name
```
## :clipboard: Example
```js
const functionName = require("function.name");
function foo () {}
console.log(functionName(foo));
// => foo
```
## :question: Get Help
There are few ways to get help:
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
## :memo: Documentation
### `functionName(input)`
Get the function name.
#### Params
- **Function** `input`: The input function.
#### Return
- **String** The function name.
Usually, you will **not** use this as function but you will access the `name` field on the function directly.
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## :sparkling_heart: Support my projects
I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
- Starring and sharing the projects you like :rocket:
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
![](https://i.imgur.com/z6OQI95.png)
Thanks! :heart:
## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
- [`aem-react-js`](https://npmjs.com/package/aem-react-js) (by Stefan Meyer)—Aem components written in React.
- [`aem-react-js-alt`](https://npmjs.com/package/aem-react-js-alt) (by Brian Bolton)—Aem components written in React. This version utilizes React v16 and adds a toggle for enabling client hydration outside of Publish mode.
- [`typpy`](https://github.com/IonicaBizau/typpy)—A better typeof for JavaScript.
## :scroll: License
[MIT][license] © [Ionică Bizău][website]
[badge_patreon]: http://ionicabizau.github.io/badges/patreon.svg
[badge_amazon]: http://ionicabizau.github.io/badges/amazon.svg
[badge_paypal]: http://ionicabizau.github.io/badges/paypal.svg
[badge_paypal_donate]: http://ionicabizau.github.io/badges/paypal_donate.svg
[patreon]: https://www.patreon.com/ionicabizau
[amazon]: http://amzn.eu/hRo9sIZ
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
[donate-now]: http://i.imgur.com/6cMbHOC.png
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(https%3A%2F%2Fionicabizau.net)&year=2016#license-mit
[website]: https://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
"use strict";
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _typeof = "function" == typeof Symbol && "symbol" == _typeof2(Symbol.iterator) ? function (e) {
return typeof e === "undefined" ? "undefined" : _typeof2(e);
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e === "undefined" ? "undefined" : _typeof2(e);
};!function (e) {
if ("object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && "undefined" != typeof module) module.exports = e();else if ("function" == typeof define && define.amd) define([], e);else {
var n;n = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, n.functionName = e();
}
}(function () {
return function e(n, t, o) {
function r(i, u) {
if (!t[i]) {
if (!n[i]) {
var c = "function" == typeof require && require;if (!u && c) return c(i, !0);if (f) return f(i, !0);var p = new Error("Cannot find module '" + i + "'");throw p.code = "MODULE_NOT_FOUND", p;
}var d = t[i] = { exports: {} };n[i][0].call(d.exports, function (e) {
var t = n[i][1][e];return r(t ? t : e);
}, d, d.exports, e, n, t, o);
}return t[i].exports;
}for (var f = "function" == typeof require && require, i = 0; i < o.length; i++) {
r(o[i]);
}return r;
}({ 1: [function (e, n) {
!function () {
var e = "name";(function () {}).name || Object.defineProperty(Function.prototype, e, { get: function get() {
var n = this.toString().trim().match(/^function\s*([^\s(]+)/)[1];return Object.defineProperty(this, e, { value: n }), n;
} });
}(), n.exports = function (e) {
return e.name;
};
}, {}] }, {}, [1])(1);
});
\ No newline at end of file
"use strict";
var noop6 = require("noop6");
(function () {
var NAME_FIELD = "name";
if (typeof noop6.name === "string") {
return;
}
try {
Object.defineProperty(Function.prototype, NAME_FIELD, {
get: function get() {
var name = this.toString().trim().match(/^function\s*([^\s(]+)/)[1];
Object.defineProperty(this, NAME_FIELD, { value: name });
return name;
}
});
} catch (e) {}
})();
/**
* functionName
* Get the function name.
*
* @name functionName
* @function
* @param {Function} input The input function.
* @returns {String} The function name.
*/
module.exports = function functionName(input) {
return input.name;
};
\ No newline at end of file
{
"name": "function.name",
"description": "Function name shim (especially for supporting function names in Internet Explorer).",
"keywords": [
"function",
"name",
"support",
"for",
"internet",
"explorer"
],
"license": "MIT",
"version": "1.0.10",
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"release": "dist-it lib/index.js function.name.js"
},
"author": "Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/IonicaBizau/function.name.git"
},
"bugs": {
"url": "https://github.com/IonicaBizau/function.name/issues"
},
"homepage": "https://github.com/IonicaBizau/function.name#readme",
"blah": {
"description": "If the name field is not accessible (usually this happens on Internet Explorer), it will be defined.",
"documentation": "Usually, you will **not** use this as function but you will access the `name` field on the function directly."
},
"devDependencies": {
"dist-it": "^2.0.1"
},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"scripts/",
"resources/",
"menu/",
"cli.js",
"index.js",
"bloggify.js",
"bloggify.json",
"bloggify/"
],
"dependencies": {
"noop6": "^1.0.1"
}
}
The MIT License (MIT)
Copyright (c) 2015-17 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
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.
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
[![idy](http://i.imgur.com/tVtnd3Y.png)](#)
# idy
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/idy.svg)](https://www.npmjs.com/package/idy) [![Downloads](https://img.shields.io/npm/dt/idy.svg)](https://www.npmjs.com/package/idy)
> Generate random and potentially unique ids.
## :cloud: Installation
```sh
$ npm i --save idy
```
## :clipboard: Example
```js
// Dependencies
var Idy = require("idy");
console.log(Idy());
// => k5goo82pv0
console.log(Idy(20));
// => gfmruywoe3uie3680l54
```
## :question: Get Help
There are few ways to get help:
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
## :memo: Documentation
### `Idy(length)`
Generates a random id and potentially unique.
#### Params
- **Number** `length`: The id length (default: 10).
#### Return
- **String** The generated id.
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## :sparkling_heart: Support my projects
I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
- Starring and sharing the projects you like :rocket:
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
![](https://i.imgur.com/z6OQI95.png)
Thanks! :heart:
## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles: