pargras 1.0.3 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2016-present, Belexos GmbH
1
+ Copyright 2016-present, tbillenstein
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  Pargras
2
2
  =======
3
3
 
4
- `Pargras` is a minimalistic helper around function arguments for Node.js and the Browser. `Pargras` has a fluent interface and supports adding, removing and altering arguments before applying them to a function.
4
+ `Pargras` is a minimalistic helper around function arguments for Node.js and the Browser. `Pargras` has a fluent
5
+ interface and supports adding, removing and altering arguments before applying them to a function.
5
6
 
6
7
 
7
8
  Getting started
@@ -23,8 +24,8 @@ const Pargras = require('pargras');
23
24
 
24
25
  ### Browser
25
26
  You can download the latest release from the repository
26
- * [`pargras.js`](https://github.com/belexos/pargras/blob/master/pargras.js) unminified, including comments
27
- * [`pargras.min.js`](https://github.com/belexos/pargras/blob/master/pargras.min.js) minified version
27
+ * [`pargras.js`](https://github.com/tbillenstein/pargras/blob/master/pargras.js) unminified, including comments
28
+ * [`pargras.min.js`](https://github.com/tbillenstein/pargras/blob/master/pargras.min.js) minified version
28
29
 
29
30
  Use a script tag to directly add `Pargras` to the global scope.
30
31
 
@@ -138,17 +139,24 @@ afunc(1, 2, 3, 4);
138
139
 
139
140
  More examples
140
141
  -------------
141
- Please refer to the [test spec](https://github.com/belexos/pargras/blob/master/spec/PargrasSpec.js) for more examples.
142
+ Please refer to the [test spec](https://github.com/tbillenstein/pargras/blob/master/spec/PargrasSpec.js) for more examples.
142
143
 
143
144
 
144
145
  Testing
145
146
  -------
146
- We are using [Jasmine testing framework](https://jasmine.github.io/index.html) and [Istanbul test coverage framework](https://istanbul.js.org/).
147
+ We use
148
+ * [JSHint](https://jshint.com/) for static code analysis.
149
+ * [Jasmine testing framework](https://jasmine.github.io/index.html) for testing.
150
+ * [Karma test runner](https://karma-runner.github.io/latest/index.html) for testing in the browser.
151
+ * [Istanbul test coverage framework](https://istanbul.js.org/) for tracking test coverage.
147
152
 
153
+ Steps to be taken
148
154
  * Clone or download the repository.
149
- * Change into project directory.
155
+ * Change into the project directory.
150
156
  * Use `npm install` to install all development dependencies.
157
+ * Use `npm runt lint` to run static code analysis.
151
158
  * Use `npm test` to run the tests.
159
+ * Use `npm run coverage` to track test coverage.
152
160
  * The output should display successful execution results and a code coverage map.
153
161
 
154
162
 
@@ -156,33 +164,45 @@ Build
156
164
  -----
157
165
  * Clone or download the repository.
158
166
  * Change into project directory.
159
- * Use `grunt` in project directory to build `pargras.min.js` from `pargras.js`.
167
+ * Use `npm run build` in project directory to build `pargras.min.js` from `pargras.js`.
160
168
 
161
169
 
162
170
  Contribution
163
171
  ------------
164
- Please use [Github issues](https://github.com/belexos/pargras/issues) for requests.
172
+ Please use [Github issues](https://github.com/tbillenstein/pargras/issues) for requests.
165
173
 
166
174
  Pull requests are welcome.
167
175
 
168
176
 
169
177
  Issues
170
178
  ------
171
- We use GitHub issues to track bugs. Please ensure your bug description is clear and has sufficient instructions to be able to reproduce the issue.
179
+ We use GitHub issues to track bugs. Please ensure your bug description is clear and has sufficient instructions to be
180
+ able to reproduce the issue.
172
181
 
173
- The absolute best way to report a bug is to submit a pull request including a new failing test which describes the bug. When the bug is fixed, your pull request can then be merged.
182
+ The absolute best way to report a bug is to submit a pull request including a new failing test which describes the bug.
183
+ When the bug is fixed, your pull request can then be merged.
174
184
 
175
- The next best way to report a bug is to provide a reduced test case on jsFiddle or jsBin or produce exact code inline in the issue which will reproduce the bug.
185
+ The next best way to report a bug is to provide a reduced test case on jsFiddle or jsBin or produce exact code inline
186
+ in the issue which will reproduce the bug.
176
187
 
177
188
 
178
189
  Support
179
190
  -------
180
- * Send us an email: [support@belexos.com](mailto:support@belexos.com)
181
- * Follow us on Twitter: [@belexos](http://twitter.com/belexos)
191
+ * Send us an email: [tb@thomasbillenstein.com](mailto:tb@thomasbillenstein.com)
192
+ * Follow us on Twitter: [@tbillenstein](https://x.com/tbillenstein/)
182
193
 
183
194
 
184
195
  Changelog
185
196
  ---------
197
+ v1.1.0
198
+ * Update npm modules.
199
+ * Update and extend test environment.
200
+ * Add static code analysis tool JSHint.
201
+ * Add Karma test runner.
202
+ * Fix JSHint issues.
203
+ * Replace uglify-js by terser for minification.
204
+ * Update README.
205
+
186
206
  v1.0.3
187
207
  * Update npm modules.
188
208
 
@@ -198,4 +218,4 @@ v1.0.0
198
218
 
199
219
  License
200
220
  -------
201
- Copyright (c) 2016-present, Belexos GmbH. `Pargras` is licensed under the [MIT License](https://github.com/belexos/pargras/blob/master/LICENSE).
221
+ Copyright (c) 2016-present, tbillenstein. `Pargras` is licensed under the [MIT License](https://github.com/tbillenstein/pargras/blob/master/LICENSE).
package/package.json CHANGED
@@ -1,19 +1,27 @@
1
1
  {
2
2
  "name": "pargras",
3
- "version": "1.0.3",
4
- "description": "Pargras is a minimalistic helper around function arguments for Node.js and the Browser. Pargras has a fluent interface and supports adding, removing and altering arguments before applying them to a function.",
3
+ "version": "1.1.1",
4
+ "description": "Pargras is a minimalistic helper around function arguments for Node.js and the browser. Pargras has a fluent interface and supports adding, removing and altering arguments before applying them to a function.",
5
5
  "main": "pargras.js",
6
6
  "directories": {
7
7
  "test": "test"
8
8
  },
9
9
  "scripts": {
10
- "test": "nyc ./node_modules/.bin/jasmine",
11
- "build": "grunt build"
10
+ "build": "grunt build",
11
+ "coverage": "nyc ./node_modules/.bin/jasmine",
12
+ "lint": "grunt jshint",
13
+ "test": "./node_modules/.bin/jasmine && npx karma start test/karma/karma.conf.js --single-run",
14
+ "test-node": "./node_modules/.bin/jasmine",
15
+ "test-browser": "npx karma start test/karma/karma.conf.js --single-run"
12
16
  },
13
17
  "repository": {
14
18
  "type": "git",
15
- "url": "https://github.com/belexos/pargras.git"
19
+ "url": "https://github.com/tbillenstein/pargras.git"
16
20
  },
21
+ "bugs": {
22
+ "url": "https://github.com/tbillenstein/pargras/issues"
23
+ },
24
+ "homepage": "https://github.com/tbillenstein/pargras#readme",
17
25
  "keywords": [
18
26
  "function",
19
27
  "argument",
@@ -27,9 +35,8 @@
27
35
  "array",
28
36
  "length"
29
37
  ],
30
- "author": "Br00ze <br00ze@belexos.com> (http://belexos.com)",
38
+ "author": "tbillenstein <tb@thomasbillenstein.com> (https://thomasbillenstein.com)",
31
39
  "license": "MIT",
32
- "homepage": "https://github.com/belexos/pargras#readme",
33
40
  "nyc": {
34
41
  "exclude": [
35
42
  "**/*Spec.js"
@@ -41,10 +48,16 @@
41
48
  },
42
49
  "dependencies": {},
43
50
  "devDependencies": {
44
- "grunt": "^1.0.4",
45
- "grunt-contrib-uglify": "^2.3.0",
51
+ "grunt": "^1.6.1",
52
+ "grunt-contrib-jshint": "^3.2.0",
46
53
  "grunt-contrib-watch": "^1.1.0",
47
- "jasmine": "^3.5.0",
48
- "nyc": "^15.0.0"
54
+ "grunt-terser": "^2.0.0",
55
+ "jasmine": "^5.13.0",
56
+ "karma": "^6.4.4",
57
+ "karma-chrome-launcher": "^3.2.0",
58
+ "karma-coverage": "^2.2.1",
59
+ "karma-firefox-launcher": "^2.1.3",
60
+ "karma-jasmine": "^5.1.0",
61
+ "nyc": "^17.1.0"
49
62
  }
50
63
  }
package/pargras.js CHANGED
@@ -1,14 +1,15 @@
1
1
  /**
2
- * Pargras - Minimalistic helper around function arguments for Node.js and the Browser.
2
+ * Pargras - Minimalistic helper around function arguments for Node.js and the browser.
3
3
  *
4
- * @copyright: Copyright (c) 2016-present, Belexos GmbH
4
+ * @copyright: Copyright (c) 2016-present, tbillenstein
5
5
  *
6
- * @author: Br00ze <br00ze@belexos.com> (http://belexos.com)
6
+ * @author: tbillenstein <tb@thomasbillenstein.com> (https://thomasbillenstein.com)
7
7
  *
8
8
  * @license This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
 
12
+
12
13
  (function(window)
13
14
  {
14
15
  const nodeEnv = typeof module === 'object' && module && typeof module.exports === 'object';
@@ -24,7 +25,7 @@
24
25
  }
25
26
 
26
27
  /**
27
- * Pargras is a minimalistic helper around function arguments for Node.js and the Browser.
28
+ * Pargras is a minimalistic helper around function arguments for Node.js and the browser.
28
29
  * Pargras has a fluent interface and supports adding, removing and altering arguments
29
30
  * before applying them to a function.
30
31
  *
@@ -182,7 +183,7 @@
182
183
 
183
184
  function isArguments(value)
184
185
  {
185
- return value != null && typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'callee')
186
+ return value != null && typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'callee');
186
187
  }
187
188
  }
188
189
  })(this);
package/pargras.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! pargras V1.0.3, Copyright (c) 2016-present, Belexos GmbH. MIT licensed. */
2
- !function(a){function b(a){"use strict";var b,c,d;if(!function(a){return null!=a&&"object"==typeof a&&Object.prototype.hasOwnProperty.call(a,"callee")}(a))throw new Error("Parameter is no arguments object");for(b=new Array(a.length),c=0,d=b.length;c<d;c++)b[c]=a[c];this.array=function(){return b},this.length=function(){return b.length},this.set=function(a,c){return a<b.length&&(b[a]=c),this},this.get=function(a){return b[a]},this.shift=function(){return b.shift(),this},this.pop=function(){return b.pop(),this},this.unshift=function(){var a;for(a=arguments.length-1;a>=0;a--)b.unshift(arguments[a]);return this},this.push=function(){var a,c=arguments.length;for(a=0;a<c;a++)b.push(arguments[a]);return this},this.applyTo=function(a,c){return a.apply(c||null,b)}}"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=b:a.Pargras=b}(this);
1
+ /*! pargras V1.1.1, Copyright (c) 2016-present, tbillenstein. MIT licensed. */
2
+ !function(t){function n(t){"use strict";var n,r,e,o;if(null==(o=t)||"object"!=typeof o||!Object.prototype.hasOwnProperty.call(o,"callee"))throw new Error("Parameter is no arguments object");for(r=0,e=(n=new Array(t.length)).length;r<e;r++)n[r]=t[r];this.array=function(){return n},this.length=function(){return n.length},this.set=function(t,r){return t<n.length&&(n[t]=r),this},this.get=function(t){return n[t]},this.shift=function(){return n.shift(),this},this.pop=function(){return n.pop(),this},this.unshift=function(){var t;for(t=arguments.length-1;t>=0;t--)n.unshift(arguments[t]);return this},this.push=function(){var t,r=arguments.length;for(t=0;t<r;t++)n.push(arguments[t]);return this},this.applyTo=function(t,r){return t.apply(r||null,n)}}"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=n:t.Pargras=n}(this);