Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
Generated Vendored Executable
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Should.js assertion library
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.
Generated Vendored Executable
+2
View File
@@ -0,0 +1,2 @@
# util
Utility functions
Generated Vendored Executable
+50
View File
@@ -0,0 +1,50 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
function hasOwnProperty(obj, key) {
return _hasOwnProperty.call(obj, key);
}
function propertyIsEnumerable(obj, key) {
return _propertyIsEnumerable.call(obj, key);
}
function merge(a, b) {
if (a && b) {
for (var key in b) {
a[key] = b[key];
}
}
return a;
}
function isIterator(obj) {
if (!obj) {
return false;
}
if (obj.__shouldIterator__) {
return true;
}
return typeof obj.next === 'function' &&
typeof Symbol === 'function' &&
typeof Symbol.iterator === 'symbol' &&
typeof obj[Symbol.iterator] === 'function' &&
obj[Symbol.iterator]() === obj;
}
//TODO find better way
function isGeneratorFunction(f) {
return typeof f === 'function' && /^function\s*\*\s*/.test(f.toString());
}
exports.hasOwnProperty = hasOwnProperty;
exports.propertyIsEnumerable = propertyIsEnumerable;
exports.merge = merge;
exports.isIterator = isIterator;
exports.isGeneratorFunction = isGeneratorFunction;
Generated Vendored Executable
+42
View File
@@ -0,0 +1,42 @@
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
function hasOwnProperty(obj, key) {
return _hasOwnProperty.call(obj, key);
}
function propertyIsEnumerable(obj, key) {
return _propertyIsEnumerable.call(obj, key);
}
function merge(a, b) {
if (a && b) {
for (var key in b) {
a[key] = b[key];
}
}
return a;
}
function isIterator(obj) {
if (!obj) {
return false;
}
if (obj.__shouldIterator__) {
return true;
}
return typeof obj.next === 'function' &&
typeof Symbol === 'function' &&
typeof Symbol.iterator === 'symbol' &&
typeof obj[Symbol.iterator] === 'function' &&
obj[Symbol.iterator]() === obj;
}
//TODO find better way
function isGeneratorFunction(f) {
return typeof f === 'function' && /^function\s*\*\s*/.test(f.toString());
}
export { hasOwnProperty, propertyIsEnumerable, merge, isIterator, isGeneratorFunction };
Generated Vendored Executable
+40
View File
@@ -0,0 +1,40 @@
{
"name": "should-util",
"version": "1.0.1",
"description": "Utility functions",
"main": "cjs/should-util.js",
"module": "es6/should-util.js",
"jsnext:main": "es6/should-util.js",
"scripts": {
"cjs": "rollup --format=cjs --output=cjs/should-util.js index.js",
"es6": "rollup --format=es --output=es6/should-util.js index.js",
"build": "npm run cjs && npm run es6",
"prepublish": "npm run build",
"pretest": "npm run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/shouldjs/util.git"
},
"keywords": [
"shouldjs",
"util"
],
"author": "Denis Bardadym <bardadymchik@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/shouldjs/util/issues"
},
"homepage": "https://github.com/shouldjs/util#readme",
"devDependencies": {
"eslint": "^3.2.2",
"eslint-config-shouldjs": "^1.0.2",
"rollup": "^0.34.7"
},
"files": [
"cjs/*",
"es6/*",
"README.md",
"LICENSE"
]
}