[Pkg-javascript-commits] [node-repeat-element] 01/03: Import Upstream version 1.1.2

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Oct 17 17:08:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository node-repeat-element.

commit 1fe271e74aa0b035ff8db278489d1bd419087856
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Oct 17 22:19:37 2016 +0530

    Import Upstream version 1.1.2
---
 LICENSE      | 21 ++++++++++++++++++
 README.md    | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 index.js     | 18 +++++++++++++++
 package.json | 44 +++++++++++++++++++++++++++++++++++++
 4 files changed, 154 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..33754da
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Jon Schlinkert
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..008e20e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,71 @@
+# repeat-element [![NPM version](https://badge.fury.io/js/repeat-element.svg)](http://badge.fury.io/js/repeat-element)
+
+> Create an array by repeating the given value n times.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/)
+
+```bash
+npm i repeat-element --save
+```
+
+## Usage
+
+```js
+var repeat = require('repeat-element');
+
+repeat('a', 5);
+//=> ['a', 'a', 'a', 'a', 'a']
+
+repeat('a', 1);
+//=> ['a']
+
+repeat('a', 0);
+//=> []
+
+repeat(null, 5)
+//» [ null, null, null, null, null ]
+
+repeat({some: 'object'}, 5)
+//» [ { some: 'object' },
+//    { some: 'object' },
+//    { some: 'object' },
+//    { some: 'object' },
+//    { some: 'object' } ]
+
+repeat(5, 5)
+//» [ 5, 5, 5, 5, 5 ]
+```
+
+## Related projects
+
+[repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string.
+
+## Running tests
+
+Install dev dependencies:
+
+```bash
+npm i -d && npm test
+```
+
+## Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-element/issues)
+
+## Author
+
+**Jon Schlinkert**
+
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+
+Copyright (c) 2015 Jon Schlinkert
+Released under the MIT license.
+
+***
+
+_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..0ad45ab
--- /dev/null
+++ b/index.js
@@ -0,0 +1,18 @@
+/*!
+ * repeat-element <https://github.com/jonschlinkert/repeat-element>
+ *
+ * Copyright (c) 2015 Jon Schlinkert.
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+module.exports = function repeat(ele, num) {
+  var arr = new Array(num);
+
+  for (var i = 0; i < num; i++) {
+    arr[i] = ele;
+  }
+
+  return arr;
+};
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..5b359b0
--- /dev/null
+++ b/package.json
@@ -0,0 +1,44 @@
+{
+  "name": "repeat-element",
+  "description": "Create an array by repeating the given value n times.",
+  "version": "1.1.2",
+  "homepage": "https://github.com/jonschlinkert/repeat-element",
+  "author": {
+    "name": "Jon Schlinkert",
+    "url": "https://github.com/jonschlinkert"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/jonschlinkert/repeat-element.git"
+  },
+  "bugs": {
+    "url": "https://github.com/jonschlinkert/repeat-element/issues"
+  },
+  "license": {
+    "type": "MIT",
+    "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE"
+  },
+  "main": "index.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "test": "mocha"
+  },
+  "files": [
+    "index.js"
+  ],
+  "keywords": [
+    "array",
+    "element",
+    "repeat",
+    "string"
+  ],
+  "devDependencies": {
+    "benchmarked": "^0.1.4",
+    "chalk": "^1.0.0",
+    "glob": "^5.0.5",
+    "minimist": "^1.1.1",
+    "mocha": "^2.2.4"
+  }
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-repeat-element.git



More information about the Pkg-javascript-commits mailing list