Skip to content

Commit

Permalink
fix(scaffold): update project scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Nov 5, 2018
1 parent d5f27d6 commit d40593a
Show file tree
Hide file tree
Showing 15 changed files with 3,770 additions and 95 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# http://editorconfig.org
root = true

[*]
Expand Down
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@ahmadnassri/eslint-config"
}
16 changes: 16 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
_extends: .github

repository:
name: node-stringify-clone
description: Wrapper for fast object cloning using `JSON.parse` & `JSON.stringify`
topics: stringify-clone
homepage: https://github.com/ahmadnassri/stringify-clone
private: false
has_issues: true
has_wiki: false
has_downloads: false
has_projects: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.log
/node_modules
/.nyc_output
/.scripts/cc-test-reporter
/coverage
/node_modules
3 changes: 3 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@ahmadnassri/semantic-release-config"
}
5 changes: 5 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"@ahmadnassri/remark-config"
]
}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

22 changes: 9 additions & 13 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
Copyright (c) 2015, Ahmad Nassri <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
MIT License

Copyright (c) 2018 Ahmad Nassri <[email protected]>

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.
50 changes: 19 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Stringify Clone [![version][npm-version]][npm-url] [![License][license-image]][license-url]
# Stringify Clone

> Wrapper for fast object cloning using `JSON.parse` & `JSON.stringify`. see [Benchmarks](https://github.com/ahmadnassri/node-clone-benchmark).
[![License][license-image]][license-url] [![version][npm-image]][npm-url] [![Build Status][circle-image]][circle-url]

[![Build Status][travis-image]][travis-url]
[![Downloads][npm-downloads]][npm-url]
[![Code Climate][codeclimate-quality]][codeclimate-url]
[![Coverage Status][codeclimate-coverage]][codeclimate-url]
[![Dependency Status][dependencyci-image]][dependencyci-url]
[![Dependencies][david-image]][david-url]
> Wrapper for fast object cloning using `JSON.parse` & `JSON.stringify`
**Notes**:
**IMPORTANT:**

> **THIS IS A [ONE LINE PACKAGE](./index.js), THERE IS NO REASON FOR YOU TO USE IT!**
- cannot clone `RegExp` *(returns `{}`)*
**Notes**:
- cannot clone `RegExp` _(returns `{}`)_
- `NaN` values will be converted to `null`
- `Date` objects will be converted to ISO strings (equivalent of running `Date.toISOString()`)
- you can reconstruct the Date by calling `new Date(string)`

## Install

```bash
npm install --only=production --save stringify-clone
npm install stringify-clone
```

## Usage

## API

### clone()
Expand All @@ -35,27 +35,15 @@ clone({
```

---
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/)  · 
> License: [ISC][license-url]  · 
> Github: [@ahmadnassri](https://github.com/ahmadnassri)  · 
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) &bull;
> Github: [@ahmadnassri](https://github.com/ahmadnassri) &bull;
> Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)
[license-url]: http://choosealicense.com/licenses/isc/
[license-image]: https://img.shields.io/github/license/ahmadnassri/stringify-clone.svg?style=flat-square
[license-url]: LICENSE
[license-image]: https://img.shields.io/github/license/ahmadnassri/node-stringify-clone.svg?style=for-the-badge&logo=circleci

[travis-url]: https://travis-ci.org/ahmadnassri/stringify-clone
[travis-image]: https://img.shields.io/travis/ahmadnassri/stringify-clone.svg?style=flat-square
[circle-url]: https://circleci.com/gh/ahmadnassri/workflows/node-stringify-clone
[circle-image]: https://img.shields.io/circleci/project/github/ahmadnassri/node-stringify-clone/master.svg?style=for-the-badge&logo=circleci

[npm-url]: https://www.npmjs.com/package/stringify-clone
[npm-version]: https://img.shields.io/npm/v/stringify-clone.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/stringify-clone.svg?style=flat-square

[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/stringify-clone
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/stringify-clone.svg?style=flat-square
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/stringify-clone.svg?style=flat-square

[david-url]: https://david-dm.org/ahmadnassri/stringify-clone
[david-image]: https://img.shields.io/david/ahmadnassri/stringify-clone.svg?style=flat-square

[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/stringify-clone
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/stringify-clone/badge?style=flat-square
[npm-image]: https://img.shields.io/npm/v/stringify-clone.svg?style=for-the-badge&logo=npm
99 changes: 99 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
version: 2.1

executors:
builder:
docker:
- image: ahmadnassri/build-essential

node-6:
docker:
- image: node:6-slim

node-8:
docker:
- image: node:8-slim

node-10:
docker:
- image: node:10-slim

commands:
persist:
steps:
- persist_to_workspace:
root: .
paths: .

attach:
steps:
- attach_workspace:
at: .

install:
steps:
- run:
name: Install dependencies
command: npm ci

jobs:
build:
executor: builder
steps:
- checkout
- install
- persist

lint:
executor: builder
steps:
- attach
- run: npm run lint

test-node-6:
executor: node-6
steps:
- attach
- run: npm run test

test-node-8:
executor: node-8
steps:
- attach
- run: npm run test

test-node-10:
executor: node-10
steps:
- attach
- run: npm run test

release:
executor: builder
steps:
- attach
- run: npx semantic-release

workflows:
version: 2
main:
jobs:
- build

- lint:
requires: [ build ]

- test-node-6:
requires: [ build ]

- test-node-8:
requires: [ build ]

- test-node-10:
requires: [ build ]

- release:
context: semantic-release
requires: [ build, lint, test-node-6, test-node-8, test-node-10 ]
filters:
branches:
only: master
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = obj => JSON.parse(JSON.stringify(obj))
3 changes: 0 additions & 3 deletions lib/index.js

This file was deleted.

Loading

0 comments on commit d40593a

Please sign in to comment.