From 2106756d8df4f734ea8483326a4a758a1d2e9e54 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 2 Feb 2018 10:27:49 +0700 Subject: [PATCH] Meta tweaks --- .editorconfig | 2 +- .gitignore | 1 + .npmrc | 1 + .travis.yml | 1 + index.js | 1 + license | 20 +++---------- package.json | 79 +++++++++++++++++++++++++-------------------------- readme.md | 2 +- test.js | 2 +- 9 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 .npmrc diff --git a/.editorconfig b/.editorconfig index 98a761d..1c6314a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,6 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[{package.json,*.yml}] +[*.yml] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index 3c3629e..239ecff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +yarn.lock diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.travis.yml b/.travis.yml index 97519af..7d69d74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: node_js node_js: + - '8' - '6' - '4' diff --git a/index.js b/index.js index 0e5f2d4..08e69d3 100644 --- a/index.js +++ b/index.js @@ -4,5 +4,6 @@ module.exports = (to, from) => { for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); } + return to; }; diff --git a/license b/license index 654d0bf..e7af2f7 100644 --- a/license +++ b/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -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: +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 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. +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. diff --git a/package.json b/package.json index bf616cd..672b3df 100644 --- a/package.json +++ b/package.json @@ -1,43 +1,40 @@ { - "name": "mimic-fn", - "version": "1.1.0", - "description": "Make a function mimic another one", - "license": "MIT", - "repository": "sindresorhus/mimic-fn", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "function", - "mimic", - "imitate", - "rename", - "copy", - "inherit", - "properties", - "name", - "func", - "fn", - "set", - "infer", - "change" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } + "name": "mimic-fn", + "version": "1.1.0", + "description": "Make a function mimic another one", + "license": "MIT", + "repository": "sindresorhus/mimic-fn", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "function", + "mimic", + "imitate", + "rename", + "copy", + "inherit", + "properties", + "name", + "func", + "fn", + "set", + "infer", + "change" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } } diff --git a/readme.md b/readme.md index 4db5c45..e575734 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ Useful when you wrap a function in another function and like to preserve the ori ## Install ``` -$ npm install --save mimic-fn +$ npm install mimic-fn ``` diff --git a/test.js b/test.js index 504c415..f1791cc 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ import test from 'ava'; -import m from './'; +import m from '.'; test(t => { const symbol = Symbol('🦄');