package init

This commit is contained in:
jackie_wu 2020-08-20 21:00:38 +08:00
parent 71c0358ec6
commit 110f8c0b57
4 changed files with 70 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,27 @@
commit 0a64fee903a8f598b7d76c6556647b8231e21c82
Author: Tom Hughes <tom@compton.nu>
Date: Thu Oct 22 19:51:50 2015 +0100
Patch out indexOf shim which isn't needed by node
diff --git a/test/shim.js b/test/shim.js
index 3124f49..14459e1 100644
--- a/test/shim.js
+++ b/test/shim.js
@@ -12,7 +12,6 @@ var reRequire = function reRequireImplementation() {
};
reRequire();
-var indexOf = require('indexof');
var has = Object.prototype.hasOwnProperty;
var enumerable = Object.prototype.propertyIsEnumerable;
@@ -154,7 +153,7 @@ test('returns names which are enumerable', function (t) {
}
var theKeys = keysShim(obj);
for (var i = 0; i < theKeys.length; ++i) {
- t.notEqual(indexOf(loopedValues, theKeys[i]), -1, theKeys[i] + ' is not enumerable');
+ t.notEqual(loopedValues.indexOf(theKeys[i]), -1, theKeys[i] + ' is not enumerable');
}
t.end();
});

39
nodejs-object-keys.spec Normal file
View File

@ -0,0 +1,39 @@
%{?nodejs_find_provides_and_requires}
Name: nodejs-object-keys
Version: 1.1.1
Release: 1
Summary: An Object.keys replacement, in case Object.keys is not available
License: MIT
URL: https://github.com/ljharb/object-keys
Source0: https://github.com/ljharb/object-keys/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: nodejs-object-keys-indexof.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(is) npm(tape)
%description
%{summary}.
%prep
%autosetup -p 1 -n object-keys-%{version}
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/object-keys
cp -pr package.json index.js isArguments.js %{buildroot}%{nodejs_sitelib}/object-keys
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} test/index.js
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{nodejs_sitelib}/object-keys
%changelog
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 1.1.1-1
- Package init

4
nodejs-object-keys.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: ljharb/object-keys
tag_prefix: "^v"
seperator: "."