commit
92e051586e
BIN
nodejs-object-keys-1.1.1.tar.gz
Normal file
BIN
nodejs-object-keys-1.1.1.tar.gz
Normal file
Binary file not shown.
27
nodejs-object-keys-indexof.patch
Normal file
27
nodejs-object-keys-indexof.patch
Normal 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
39
nodejs-object-keys.spec
Normal 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
4
nodejs-object-keys.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: ljharb/object-keys
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user