Comparing version 0.0.1 to 2.0.0
{ | ||
"name": "sugar-core", | ||
"version": "0.0.1", | ||
"description": "Core module for Sugar. Provides native extending functionality.", | ||
"keywords": ["functional", "utility"], | ||
"homepage": "http://sugarjs.com/", | ||
"author": "Andrew Plummer", | ||
"main": "core.js", | ||
"repository" : { | ||
"type" : "git", | ||
"url": "https://github.com/andrewplummer/sugar-core" | ||
"description": "Core package for the Sugar Javascript utility library.", | ||
"keywords": [ | ||
"sugar", | ||
"sugarjs", | ||
"functional", | ||
"browser", | ||
"utility", | ||
"util" | ||
], | ||
"homepage": "https://sugarjs.com/", | ||
"icon": "https://sugarjs.com/icon.svg", | ||
"author": "Andrew Plummer <plummer.andrew@gmail.com>", | ||
"license": "MIT", | ||
"main": "sugar-core.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/andrewplummer/Sugar.git" | ||
}, | ||
"engines" : {"node" : ">= 0.4.0"}, | ||
"license": "MIT" | ||
} | ||
"bugs": { | ||
"url": "https://github.com/andrewplummer/Sugar/issues" | ||
}, | ||
"engines": { | ||
"node": ">= 0.8.23" | ||
}, | ||
"browser": { | ||
"buffer": false | ||
}, | ||
"version": "2.0.0" | ||
} |
@@ -0,7 +1,66 @@ | ||
# sugar-core | ||
# Sugar Core | ||
This is the core package of the [Sugar](https://github.com/andrewplummer/Sugar) | ||
library. It provides basic behavior as well as the ability to define new methods. | ||
All Sugar npm packages depend on this package. Plugin developers can also depend | ||
on it to define new methods for Sugar plugins. | ||
This is the core module for Sugar. It exists to give a hook for creating plugins for Sugar, and is a dependency of Sugar itself. | ||
Issues are not active in this repo, please post them to the main Sugar repo instead: | ||
## Documentation | ||
https://github.com/andrewplummer/Sugar | ||
#### [https://sugarjs.com/docs/](https://sugarjs.com/docs/) | ||
Note: All define methods are called on the global (or exported object in npm), | ||
and accept either a name and a function as two arguments or a single object | ||
mapping names to functions. | ||
## defineStatic | ||
Defines a method to be called on the Sugar global or on a native global in | ||
extended mode. | ||
## defineInstance | ||
Defines a method to be called on the Sugar global or as an instance method on | ||
chainables or native objects in extended mode. All methods should accept the | ||
instance object as their first argument, and should never refer to `this`. | ||
## defineInstanceAndStatic | ||
Defines a method to be called both as an instance and static method. This method | ||
is required for Object methods, which must be defined as both static (as Sugar | ||
will not extend `Object.prototype`) and instance (for chainables). Use this for | ||
any methods intended as Object instance methods. | ||
## defineStaticWithArguments | ||
This method is identical to `defineStatic` except that when methods are called, | ||
they will collect any arguments past `n - 1`, where `n` is the number of | ||
arguments that the method accepts. Collected arguments will be passed to the | ||
method as the last argument defined. | ||
## defineInstanceWithArguments | ||
This method is identical to `defineInstance` except that when methods are | ||
called, they will collect any arguments past `n - 1`, where `n` is the number of | ||
arguments that the method accepts. Collected arguments will be passed to the | ||
method as the last argument defined. | ||
## defineStaticPolyfill | ||
Defines a static method that is mapped onto a native if it does not already | ||
exist. Intended only for creating polyfills that follow the ECMAScript spec. | ||
## defineInstancePolyfill | ||
Defines an instance method that is mapped onto a native prototype if it does not | ||
already exist. Intended only for creating polyfills that follow the ECMAScript | ||
spec. Note that this method differs from `defineInstance` as there is no static | ||
signature (as the method is mapped as-is to the native), so it should refer to | ||
its `this` object. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
166640
9
3048
1
0
67
1