Skip to content

Commit d81c956

Browse files
author
Harrison Ifeanyichukwu
committed
chore: Rename package's npm name and github repo name
1 parent 9bea617 commit d81c956

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

README.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# XML-Serializer
1+
# R-Serializer
22

3-
[![Build Status](https://travis-ci.org/harrison-ifeanyichukwu/xml-serializer.svg?branch=master)](https://travis-ci.org/harrison-ifeanyichukwu/xml-serializer)
4-
[![Coverage Status](https://coveralls.io/repos/github/harrison-ifeanyichukwu/xml-serializer/badge.svg?branch=master)](https://coveralls.io/github/harrison-ifeanyichukwu/xml-serializer?branch=master)
3+
[![Build Status](https://travis-ci.org/harrison-ifeanyichukwu/r-serializer.svg?branch=master)](https://travis-ci.org/harrison-ifeanyichukwu/r-serializer)
4+
[![Coverage Status](https://coveralls.io/repos/github/harrison-ifeanyichukwu/r-serializer/badge.svg?branch=master)](https://coveralls.io/github/harrison-ifeanyichukwu/r-serializer?branch=master)
55
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6-
[![npm version](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fxml-serializer.svg)](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fxml-serializer)
6+
[![npm version](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fr-serializer.svg)](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fr-serializer)
77

8-
XML-Serializer is A JavaScript complete implementation of the W3C [xml serialization](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml) spec. All specifications have been implemented and includes the following [specs](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-xml-serialization-algorithm):
8+
R-Serializer is a complete JavaScript implementation of the W3C [xml serialization](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml) specifications. All specifications have been implemented and includes the following [specs](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-xml-serialization-algorithm):
99

1010
- [ELEMENT_NODE Serialization]
1111

@@ -23,44 +23,36 @@ XML-Serializer is A JavaScript complete implementation of the W3C [xml serializa
2323

2424
## Module Availability
2525

26-
This module is available as an [npm](https://www.npmjs.com/) scoped package and also has a browser build that is located inside the `dist` folder. It can easily be integrated with [JSDOM](https://github.com/jsdom/jsdom) for mockup testing.
26+
This module is available as an [npm](https://www.npmjs.com/) package and also has a browser build that is located inside the `dist` folder. It can easily be integrated with [JSDOM](https://github.com/jsdom/jsdom) for mockup testing.
2727

28-
## Installing the Package
28+
## Getting Started
2929

30-
The below command will install `xml-serializer` from npm into your project assuming you have the [npm](https://www.npmjs.com/) already installed.
31-
32-
> NB: Because of some conflicting package names that already exists on npm, this one has been turned into a scoped package with public access.
30+
The below command will install `r-serializer` from npm into your project assuming you have the [npm](https://www.npmjs.com/) already installed.
3331

3432
**Install as a development dependency**:
3533

3634
```bash
37-
npm install --save-dev @harrison-ifeanyichukwu/xml-serializer
38-
```
39-
40-
**Install as a production dependency**:
41-
42-
```bash
43-
npm install --save @harrison-ifeanyichukwu/xml-serializer
35+
npm install --save-dev r-serializer
4436
```
4537

4638
## Usage Guide
4739

4840
following the specification, the `XMLSerializer` interface is a constructor and has a `serializeToString(root)` method exposed on the instance. To serialize any xml node, call the `serializeToString(root)` method on a constructed instance, passing in the xml node as below
4941

5042
```javascript
51-
import XMLSerializer from '@harrison-ifeanyichukwu/xml-serializer';
43+
import XMLSerializer from 'r-serializer';
5244

5345
let instance = new XMLSerializer();
5446
console.log(instance.serializeToString(someXmlNode));
5547
```
5648

5749
### Using with [JSDOM](https://github.com/jsdom/jsdom)
5850

59-
Currently, JSDOM has not implemented the `XMLSerializer` feature. This can be easily integrated with JSDOM and any other similar mockup environment like below.
51+
Currently, JSDOM has not implemented the `XMLSerializer` interface. This can be easily integrated with JSDOM and any other similar mockup environment or for web scrapping and xml feed parsing like below.
6052

6153
```javascript
6254
//assumes jsdom has been installed.
63-
import XMLSerializer from '@harrison-ifeanyichukwu/xml-serializer';
55+
import XMLSerializer from 'r-serializer';
6456
import {JSDOM} from 'jsdom';
6557

6658
let dom = new JSDOM();
@@ -85,7 +77,8 @@ let instance = new XMLSerializer(false) // preserveWhiteSpace is set to false. i
8577
//preserve white spaces
8678
```
8779

88-
Another improvement is that it removes all duplicate prefix definition on any xml element which is part of the specification unlike what web browsers do. Below is an example of this
80+
Another improvement is that it removes all duplicate prefix definition on any xml element as recommended in the specification document unlike what web browsers do. Below is an example of
81+
this:
8982

9083
**Original XML**:
9184

@@ -141,6 +134,8 @@ Another improvement is that it removes all duplicate prefix definition on any xm
141134

142135
**Chrome inbuilt XMLSerializer Output:**
143136

137+
Notice that all of the duplicated namespaces are removed.
138+
144139
```xml
145140
<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE root PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
146141
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -190,7 +185,9 @@ Another improvement is that it removes all duplicate prefix definition on any xm
190185
</root>
191186
```
192187

193-
**Output of this module: removes the duplicate namspace declarations:**
188+
**Output of this module:**
189+
190+
Notice that all of the duplicated namespaces are removed.
194191

195192
```xml
196193
<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE root PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@harrison-ifeanyichukwu/xml-serializer",
2+
"name": "r-serializer",
33
"version": "0.0.0-development",
4-
"description": "A javascript implementation of w3c xml-serialization spec",
4+
"description": "R-Serializer is a complete JavaScript implementation of the W3C xml serialization specifications",
55
"main": "lib/main.js",
66
"publishConfig": {
77
"access": "public"
@@ -20,7 +20,7 @@
2020
},
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/harrison-ifeanyichukwu/xml-serializer.git"
23+
"url": "https://github.com/harrison-ifeanyichukwu/r-serializer.git"
2424
},
2525
"keywords": [
2626
"xml-serialization",
@@ -32,9 +32,9 @@
3232
"author": "Harrison Ifeanyichukwu <[email protected]> (https://harrison-ifeanyichukwu.github.io/)",
3333
"license": "MIT",
3434
"bugs": {
35-
"url": "https://github.com/harrison-ifeanyichukwu/xml-serializer/issues"
35+
"url": "https://github.com/harrison-ifeanyichukwu/r-serializer/issues"
3636
},
37-
"homepage": "https://github.com/harrison-ifeanyichukwu/xml-serializer#readme",
37+
"homepage": "https://github.com/harrison-ifeanyichukwu/r-serializer#readme",
3838
"devDependencies": {
3939
"babel-plugin-external-helpers": "6.22.0",
4040
"babel-preset-env": "1.7.0",

0 commit comments

Comments
 (0)