[Pkg-javascript-commits] [node-array-equal] 01/03: Imported Upstream version 1.0.0

Thorsten Alteholz alteholz at moszumanska.debian.org
Wed Feb 24 21:06:21 UTC 2016


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

alteholz pushed a commit to branch master
in repository node-array-equal.

commit 4a7de8765b110519673ac9e884106485e9e70336
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Wed Feb 24 20:14:35 2016 +0100

    Imported Upstream version 1.0.0
---
 .gitignore     |  1 +
 LICENSE        | 22 ++++++++++++++++++++++
 README.md      | 11 +++++++++++
 component.json | 10 ++++++++++
 index.js       |  9 +++++++++
 package.json   | 13 +++++++++++++
 6 files changed, 66 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e347262
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store*
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me at jongleberry.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:
+
+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..522dd81
--- /dev/null
+++ b/README.md
@@ -0,0 +1,11 @@
+
+# Array Equal
+
+Check if two arrays are equal:
+
+```js
+var equals = require('array-equal')
+
+assert(equals([1, 2, 3], [1, 2, 3])) // => true
+assert(equals([1, 2, 3], [1, 2, 3, 4])) // => false
+```
diff --git a/component.json b/component.json
new file mode 100644
index 0000000..2d555b2
--- /dev/null
+++ b/component.json
@@ -0,0 +1,10 @@
+{
+  "name": "array-equal",
+  "description": "check if two arrays are equal",
+  "version": "1.0.0",
+  "license": "MIT",
+  "repository": "component/array-equal",
+  "scripts": [
+    "index.js"
+  ]
+}
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..c4b8803
--- /dev/null
+++ b/index.js
@@ -0,0 +1,9 @@
+
+module.exports = function equal(arr1, arr2) {
+  var length = arr1.length
+  if (length !== arr2.length) return false
+  for (var i = 0; i < length; i++)
+    if (arr1[i] !== arr2[i])
+      return false
+  return true
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..6974534
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+  "name": "array-equal",
+  "description": "check if two arrays are equal",
+  "version": "1.0.0",
+  "author": {
+    "name": "Jonathan Ong",
+    "email": "me at jongleberry.com",
+    "url": "http://jongleberry.com",
+    "twitter": "https://twitter.com/jongleberry"
+  },
+  "license": "MIT",
+  "repository": "component/array-equal"
+}

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



More information about the Pkg-javascript-commits mailing list