rename inner function name to keep consistency with exported name

Change-Id: I59313d296758c505ed6256abe99716d6dee48258
This commit is contained in:
Yujun Zhang 2016-07-20 09:56:13 +08:00
parent df6ee674df
commit df050e8b3d
1 changed files with 6 additions and 6 deletions

View File

@ -46,7 +46,7 @@ function synchronizeDependencies (dependencyMap) {
* @param {String} pkgString The package string content.
* @returns {void}
*/
function readPackage (pkgString) {
function fromJSON (pkgString) {
pkgContent = JSON.parse(pkgString);
}
@ -55,7 +55,7 @@ function readPackage (pkgString) {
*
* @returns {String} The JSON content of the package, as a string.
*/
function writePackage () {
function toJSON () {
// Clone the package content so we don't destroy what's in memory...
var newContent = JSON.parse(JSON.stringify(pkgContent));
@ -159,10 +159,10 @@ function addCommand (name, command) {
}
module.exports = {
/** @see {@link module:pkg_builder~readPackage} */
fromJSON: readPackage,
/** @see {@link module:pkg_builder~writePackage} */
toJSON: writePackage,
/** @see {@link module:pkg_builder~fromJSON} */
fromJSON: fromJSON,
/** @see {@link module:pkg_builder~toJSON} */
toJSON: toJSON,
/** @see {@link module:pkg_builder~setValues} */
setValues: setValues,
/** @see {@link module:pkg_builder~getValues} */